<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Bradley Holt &#187; SQL</title>
	<atom:link href="http://bradley-holt.com/tag/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://bradley-holt.com</link>
	<description></description>
	<lastBuildDate>Thu, 17 May 2012 01:04:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Entity Relationships in a Document Database</title>
		<link>http://bradley-holt.com/2012/05/entity-relationships-in-a-document-database/</link>
		<comments>http://bradley-holt.com/2012/05/entity-relationships-in-a-document-database/#comments</comments>
		<pubDate>Thu, 17 May 2012 01:04:35 +0000</pubDate>
		<dc:creator>Bradley Holt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Boston]]></category>
		<category><![CDATA[Couchbase]]></category>
		<category><![CDATA[CouchConf]]></category>
		<category><![CDATA[CouchDB]]></category>
		<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[Software Design]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://bradley-holt.com/?p=1546</guid>
		<description><![CDATA[This week I attended and presented at CouchConf Boston. I&#8217;d like to thank Couchbase for inviting me to speak—it was a great opportunity to meet other CouchDB and Couchbase users. I&#8217;ve posted the slides from my Entity Relationships in a Document Database talk to Speaker Deck (and SlideShare, if you prefer): The presentation covered four [...]]]></description>
			<content:encoded><![CDATA[<p>This week I attended and presented at CouchConf Boston. I&#8217;d like to thank <a href="http://www.couchbase.com/">Couchbase</a> for inviting me to speak—it was a great opportunity to meet other CouchDB and Couchbase users. I&#8217;ve posted the slides from my <a href="https://speakerdeck.com/u/bradleyholt/p/entity-relationships-in-a-document-database-at-couchconf-boston">Entity Relationships in a Document Database talk to Speaker Deck</a> (and <a href="http://www.slideshare.net/bradley.holt/entity-relationships-in-a-document-database-at-couchconf-boston">SlideShare</a>, if you prefer):<br />
<script async class="speakerdeck-embed" data-id="4fb26ea25a67ef03a500dc41" data-ratio="1.3333333333333333" src="//speakerdeck.com/assets/embed.js"></script><br />
The presentation covered four patterns for modeling entity relationships in document databases such as CouchDB and Couchbase:</p>
<ul>
<li>Embedded Entities</li>
<li>Related Documents</li>
<li>List of Keys</li>
<li>Relationship Documents</li>
</ul>
<p>See the presentation for more details. This topic is also covered in the <em>MapReduce Views for SQL Users</em> chapter in the second edition of <a href="http://shop.oreilly.com/product/0636920018247.do">Writing and Querying MapReduce Views in CouchDB</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bradley-holt.com/2012/05/entity-relationships-in-a-document-database/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Speaking at CouchConf Boston</title>
		<link>http://bradley-holt.com/2012/04/speaking-at-couchconf-boston/</link>
		<comments>http://bradley-holt.com/2012/04/speaking-at-couchconf-boston/#comments</comments>
		<pubDate>Thu, 26 Apr 2012 18:40:38 +0000</pubDate>
		<dc:creator>Bradley Holt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Boston]]></category>
		<category><![CDATA[Couchbase]]></category>
		<category><![CDATA[CouchConf]]></category>
		<category><![CDATA[CouchDB]]></category>
		<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://bradley-holt.com/?p=1527</guid>
		<description><![CDATA[I will be giving a presentation on Entity Relationships in a Document Database at CouchConf Boston on May 15th. The talk description: Unlike relational databases, document databases like CouchDB and Couchbase do not directly support entity relationships. This talk will explore patterns of modeling one-to-many and many-to-many entity relationships in a document database. These patterns [...]]]></description>
			<content:encoded><![CDATA[<p>I will be giving a presentation on <em>Entity Relationships in a Document Database</em> at <a href="http://www.couchbase.com/couchconf-boston">CouchConf Boston</a> on May 15<sup>th</sup>. The talk description:</p>
<blockquote><p>Unlike relational databases, document databases like CouchDB and Couchbase do not directly support entity relationships. This talk will explore patterns of modeling one-to-many and many-to-many entity relationships in a document database. These patterns include using an embedded JSON array, relating documents using identifiers, using a list of keys, and using relationship documents.</p></blockquote>
<p>Additionally, this talk will address how each entity relationship pattern equates to its equivalent in a relational database. I&#8217;ll be discussing the relevant differences between document databases and relational databases such as:</p>
<ul>
<li>Document databases do not have tables</li>
<li>Each document can have its own schema</li>
<li>There is no built-in concept of relationships between documents</li>
<li>Views/indexes are queried directly instead of being used to optimize more generalized queries</li>
<li>A column within a result set can contain a mix of logical data types</li>
<li>There is typically no support for transactions across document boundaries</li>
</ul>
<p>This talk is based on the <em>MapReduce Views for SQL Users</em> chapter that I&#8217;ve added to the second edition of <a href="http://shop.oreilly.com/product/0636920018247.do">Writing and Querying MapReduce Views in CouchDB</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bradley-holt.com/2012/04/speaking-at-couchconf-boston/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vermont Code Camp</title>
		<link>http://bradley-holt.com/2010/08/vermont-code-camp-2/</link>
		<comments>http://bradley-holt.com/2010/08/vermont-code-camp-2/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 13:23:11 +0000</pubDate>
		<dc:creator>Bradley Holt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[BTV]]></category>
		<category><![CDATA[btvphpug]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Software Deployment]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Vermont]]></category>
		<category><![CDATA[vtcodecamp]]></category>

		<guid isPermaLink="false">http://bradley-holt.com/?p=713</guid>
		<description><![CDATA[This year&#8217;s Vermont Code Camp will be on Saturday, September 11th, 2010 at Kalkin Hall on the University of Vermont campus. Last year&#8217;s event was a big success with 85 attendees and 19 sessions and this one promises to be even bigger and better! The second annual Vermont Code Camp will be a full day [...]]]></description>
			<content:encoded><![CDATA[<p>This year&#8217;s <a href="http://vtcodecamp.org/">Vermont Code Camp</a> will be on Saturday, September 11th, 2010 at Kalkin Hall on the University of Vermont campus. Last year&#8217;s event was a big success with 85 attendees and 19 sessions and this one promises to be even bigger and better! The second annual Vermont Code Camp will be a full day event bringing together technology community members, students, and professionals from around Vermont and beyond.</p>
<p><a href="http://vtcodecamp.org/"><img class="size-full wp-image-722 alignleft" title="Vermont Code Camp" src="http://bradley-holt.com/wp-content/uploads/2010/07/Vermont-Code-Camp-gradient-250x96.png" alt="Vermont Code Camp" width="250" height="96" /></a>There will be four rooms with sessions on .NET, PHP, Ruby, Python, Java, and more. Two of the rooms will have .NET topics and another will have sessions on free/open source software. There will be a fourth room where developers will be introduced to various technologies that they may not use every day. For example, are you a .NET developer? Come and learn about PHP, Ruby, Python, or Java. A Ruby developer? Learn about .NET, PHP, Python, or Java. You get the idea.</p>
<p>Vermont Code Camp is a great way to bring together technology user groups from around Vermont. The <a href="http://www.vtdotnet.org/">Vermont.NET User Group</a> is the primary organizer of the event but we hope to see others from the <a href="http://groups.google.com/group/burlington-vt-php">Burlington, VT  PHP Users Group</a> (which I organize), the <a href="http://vtrails.org/">Vermont Ruby On  Rails User Group</a>, the <a href="http://www.uvm.org/vague/">Vermont Area  Group of Unix Enthusiasts</a> (VAGUE), the <a href="http://www.gmoug.org/">Green Mountain Oracle Users Group</a>, the <a href="http://www.neaug.org/">New England Adobe User Group</a>, and the <a href="http://vtsql.sqlpass.org/">VT SQL Server Users Group</a> there. Do you know of any other Vermont technology user groups? Please let me know so that we can invite them!</p>
]]></content:encoded>
			<wfw:commentRss>http://bradley-holt.com/2010/08/vermont-code-camp-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TEK·X Day Two</title>
		<link>http://bradley-holt.com/2010/05/tek%c2%b7x-day-two/</link>
		<comments>http://bradley-holt.com/2010/05/tek%c2%b7x-day-two/#comments</comments>
		<pubDate>Fri, 21 May 2010 04:50:26 +0000</pubDate>
		<dc:creator>Bradley Holt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHPUnit]]></category>
		<category><![CDATA[Software Deployment]]></category>
		<category><![CDATA[SPL]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[tekX]]></category>
		<category><![CDATA[tekX10]]></category>
		<category><![CDATA[Xdebug]]></category>
		<category><![CDATA[XMPP]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://bradley-holt.com/?p=683</guid>
		<description><![CDATA[It&#8217;s hard to believe tomorrow is the last day of TEK·X. Where did the time go? Today started with Matthew Schmidt&#8217;s 10 Developer Trends in 2010. He talked about agile development, browser standards, AJAX, security vulnerabilities, RIAs, touch interfaces, key/value stores, version control, cloud computing, and dynamic languages. While not a bad keynote, the topics [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s hard to believe tomorrow is the last day of <a href="http://tek.phparch.com/">TEK·X</a>. Where did the time go? Today started with Matthew Schmidt&#8217;s 10 Developer Trends in 2010. He talked about agile development, browser standards, AJAX, security vulnerabilities, RIAs, touch interfaces, key/value stores, version control, cloud computing, and dynamic languages. While not a bad keynote, the topics seemed fairly basic and obvious given the audience.</p>
<p>Next up for me was Derick Rethans&#8217; <a href="http://xdebug.org/">Xdebug</a> talk. Xdebug is an extremely useful tool for PHP developers. I&#8217;ve used its <a href="http://xdebug.org/docs/stack_trace">stack trace</a> feature as well as its <a href="http://www.phpunit.de/manual/3.4/en/code-coverage-analysis.html">code coverage analysis via PHPUnit</a>. I&#8217;ve also dabbled with its <a href="http://xdebug.org/docs/profiler">profiling</a> capabilities. The session introduced me to several other Xdebug features with which I&#8217;d like to experiment.</p>
<p>After that I had the pleasure of seeing Matthew Turland&#8217;s talk on <a href="http://matthewturland.com/2010/05/20/new-spl-features-in-php-5-3/">New SPL Features in PHP 5.3</a>. New SPL data structures in PHP 5.3 include stacks, queues, heaps, priority queues, and sets. Matthew provided test code that compared the performance and memory usage of each these new data structures to that of using PHP&#8217;s array functionality.</p>
<p>I skipped the first afternoon session to take part in the Hack Track which happened to coincide with Zend Framework&#8217;s <a href="http://devzone.zend.com/article/12150">May Bug Hunt Days</a>. I was granted commit access and directly committed my first bug fix, a small change to <a href="http://framework.zend.com/issues/browse/ZF-9845">make HTTP headers case-insensitive</a>.</p>
<p>Others stuck around to fix more bugs while I went to check out Bill Karwin&#8217;s <a href="http://www.slideshare.net/billkarwin/models-for-hierarchical-data">Models for Hierarchical Data with SQL and PHP</a>. Examples of hierarchical data include categories/subcategories, bill of materials, and threaded discussions. Bill talked about four main approaches to storing hierarchical data in SQL databases: adjacency list, path enumeration, nested sets, and usage of a closure table.</p>
<p>The <em>adjacency list</em> is a naive approach that almost everyone tries first. Basically, each entry knows its immediate parent. The problem with this approach is that querying deep trees can be very inefficient involving many joins. <em>Path enumeration</em> involves storing an enumerated chain of ancestors in each entry. This can be very efficient and take advantage of indexing. However, there is no referential integrity with this approach. The <em>nested set</em> approach seemed a bit complicated. I don&#8217;t feel I can explain it properly here, so you&#8217;ll have to check out Bill&#8217;s slides if you&#8217;re interested in how this works. The <em>closure table</em> approach made the most sense to me and didn&#8217;t seem overly complicated. Not only do you store each entry, but you also store every path including those from the parent node to each descendant, those from each ancestor to its child node, as well as a reflexive reference from the node to itself.</p>
<p>My final session of the day was Travis Swicegood&#8217;s Building Real-Time Applications with XMPP, the <a href="http://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol">Extensible Messaging and Presence Protocol</a>. If you&#8217;ve use Google Talk then you&#8217;ve used XMPP. As a web developer, the request and response pattern in HTTP is ingrained into my thinking. However, XMPP is a very different creature in that it keeps a socket open during what can be a lengthy exchange of messages. While I don&#8217;t think HTTP is going away anytime soon, real-time applications involving potentially large numbers of publishers and subscribers (e.g. Twitter) are becoming more prevalent and XMPP is well suited for this environment.</p>
]]></content:encoded>
			<wfw:commentRss>http://bradley-holt.com/2010/05/tek%c2%b7x-day-two/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TEK·X Day One</title>
		<link>http://bradley-holt.com/2010/05/tek%c2%b7x-day-one/</link>
		<comments>http://bradley-holt.com/2010/05/tek%c2%b7x-day-one/#comments</comments>
		<pubDate>Thu, 20 May 2010 04:52:05 +0000</pubDate>
		<dc:creator>Bradley Holt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Graph Theory]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Scalability]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Software Deployment]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[tekX]]></category>
		<category><![CDATA[Titanium]]></category>

		<guid isPermaLink="false">http://bradley-holt.com/?p=679</guid>
		<description><![CDATA[Day one of TEK·X here in Chicago got off to a great start with Josh Holmes&#8217; Lost Art of Simplicity keynote. I agreed with pretty much everything that Josh had to say. As software developers, we&#8217;re often all too eager to start building a complex solution to what may be a simple problem. Following are [...]]]></description>
			<content:encoded><![CDATA[<p>Day one of <a href="http://tek.phparch.com/">TEK·X</a> here in Chicago got off to a great start with Josh Holmes&#8217; <a href="http://www.slideshare.net/joshholmes/the-lost-art-of-simplicity">Lost Art of Simplicity</a> keynote. I agreed with pretty much everything that Josh had to say. As software developers, we&#8217;re often all too eager to start building a complex solution to what may be a simple problem.</p>
<p>Following are some short notes on the other sessions I attended today:</p>
<ul>
<li>I&#8217;m always amazed at the Apache web server&#8217;s capabilities and Rich Bowen didn&#8217;t disappoint with his <a href="http://www.slideshare.net/rbowen/apache-cookbook-tekx-chicago-2010">Apache Cookbook</a> talk.</li>
<li>Joël Perras&#8217; talk on <a href="http://www.slideshare.net/jperras/graphs-edges-nodes-untangling-the-social-web">Graphs, Edges &amp; Nodes</a> was a useful introduction to an important concept in today&#8217;s world of social networking and linked data.</li>
<li>David Strauss gave the audience a ton of helpful information about creating a scalable LAMP infrastructure.</li>
<li>Scott MacVicar talked about some upcoming features in the PHP language itself.</li>
<li>Bill Karwin gave a very clear presentation on <a href="http://www.slideshare.net/billkarwin/sql-injection-myths-and-fallacies">SQL Injection Myths and Fallacies</a>. This is a topic any web developer must have a good handle on since SQL injection is one of the most common security vulnerabilities.</li>
<li>Ben Ramsey talked about creating Desktop Apps with PHP and Titanium. I found this to be a very intriguing, albeit bizarre, technology.</li>
</ul>
<p>The evening wrapped up with a social event and open bar sponsored by <a href="http://www.zend.com/">Zend</a> and <a href="http://www.echolibre.com/">Echolibre</a>. This was a great opportunity to catch up with others from the PHP community. I&#8217;m looking forward to another full day of sessions tomorrow.</p>
]]></content:encoded>
			<wfw:commentRss>http://bradley-holt.com/2010/05/tek%c2%b7x-day-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TEK·X Arrival and Day Zero</title>
		<link>http://bradley-holt.com/2010/05/tek%c2%b7x-arrival-and-day-zero/</link>
		<comments>http://bradley-holt.com/2010/05/tek%c2%b7x-arrival-and-day-zero/#comments</comments>
		<pubDate>Wed, 19 May 2010 01:20:04 +0000</pubDate>
		<dc:creator>Bradley Holt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[tekX]]></category>
		<category><![CDATA[tekX10]]></category>

		<guid isPermaLink="false">http://bradley-holt.com/?p=673</guid>
		<description><![CDATA[Yesterday I arrived in Chicago for my first TEK·X PHP conference. After getting in, I had an interesting conversation with Bill Karwin over dinner. Bill is the author of  SQL Antipatterns and is presenting on SQL Injection Myths and Fallacies as well as Models for Hierarchical Data with SQL and PHP here at TEK·X. I [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I arrived in Chicago for my first <a href="http://tek.phparch.com/">TEK·X</a> PHP conference. After getting in, I had an interesting conversation with <a href="http://karwin.blogspot.com/">Bill Karwin</a> over dinner. Bill is the author of  <a href="http://www.pragprog.com/titles/bksqla/sql-antipatterns">SQL Antipatterns</a> and is presenting on <a href="http://tek.phparch.com/talks/#TEKXS37">SQL Injection Myths and Fallacies</a> as well as <a href="http://tek.phparch.com/talks/#TEKXS09">Models for Hierarchical Data with SQL and PHP</a> here at TEK·X. I was able to pick his brain on a wide range of topics including his thoughts on <a href="http://en.wikipedia.org/wiki/NoSQL">NoSQL</a> and <a href="http://en.wikipedia.org/wiki/Object-relational_mapping">Object-Relational Mappers</a> (ORMs). I tend to be skeptical of both (although there are certainly uses for both) and I got the sense from our conversation that my skepticism is well founded.</p>
<p>Today was tutorial day, or day zero. This morning I attended Arne Blankerts&#8217; <a href="http://tek.phparch.com/talks/#TEKXT03">Bad Guy For a Day – A Websecurity hands-on tutorial</a>. I liked that he took a step back and looked at the different types of security such as the transport layer, infrastructure layer, data warehouse, user interface design, user level security, and application level security. He talked about the usual suspects such as <a href="http://en.wikipedia.org/wiki/Cross-site_scripting">cross-site scripting</a> (XSS), <a href="http://en.wikipedia.org/wiki/Session_fixation">session fixation</a>, <a href="http://en.wikipedia.org/wiki/Cross-site_request_forgery">cross-site request forgery</a> (XSRF), and <a href="http://en.wikipedia.org/wiki/SQL_injection">SQL injection</a>. <a href="http://shiflett.org/blog/2005/feb/my-top-two-php-security-practices">Filtering input and escaping output</a> was also addressed, of course. He demonstrated attacks on several security holes in an (intentionally) badly written application. Take a look at the <a href="http://www.slideshare.net/TheSeer/bad-guy-for-a-day-a-websecurity-handson-tutorial">slides</a> for more details.</p>
<p>This afternoon I attended Ed Finkler&#8217;s <a href="http://tek.phparch.com/talks/#TEKXT05">JavaScript for PHP Developers</a> talk. Like most PHP developers, I find myself often working with other web technologies such as JavaScript. The object model in JavaScript is very different than in PHP and I found Ed&#8217;s explanations of these differences very helpful. The JavaScript core language is often confused with the <a href="http://en.wikipedia.org/wiki/Document_Object_Model">Document Object Model</a> (DOM) API and a clear explanation of the line between the two was also useful. His slides don&#8217;t appear to be posted yet, but I&#8217;ll link to them once they are.</p>
<p>One last note: if you happen to be here at TEK·X then be sure to rate the sessions on <a href="http://joind.in/">joind.in</a>. The speakers really appreciate the feedback!</p>
]]></content:encoded>
			<wfw:commentRss>http://bradley-holt.com/2010/05/tek%c2%b7x-arrival-and-day-zero/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

