<?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>HalWebGuy.  Online Media Geek. &#187; Software Development</title>
	<atom:link href="http://halwebguy.danziger.net/category/software-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://halwebguy.danziger.net</link>
	<description>following the crossroads of media and technology products</description>
	<lastBuildDate>Fri, 30 Apr 2010 13:04:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The NoSQL Movement: The Object &#8211; RDMBS Incompatability</title>
		<link>http://halwebguy.danziger.net/2010/02/25/the-nosql-movement-the-object-rdmbs-incompatability/</link>
		<comments>http://halwebguy.danziger.net/2010/02/25/the-nosql-movement-the-object-rdmbs-incompatability/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 15:03:26 +0000</pubDate>
		<dc:creator>halwebguy</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[object oriented programming]]></category>

		<guid isPermaLink="false">http://halwebguy.danziger.net/?p=162</guid>
		<description><![CDATA[




		
			Tweet This!
		
		
			Share this on Facebook
		
		
			Share this on del.icio.us
		
		
			Share this on Reddit
		
		
			Stumble upon something good? Share it on StumbleUpon
		
		
			Subscribe to the comments for this post?
		





I could prove that I&#8217;m a dinosaur and say &#8220;are you out of your mind &#8212; No SQL?&#8221;  But then, I would be the one out of my mind.
I&#8217;ve always used relational [...]]]></description>
			<content:encoded><![CDATA[

<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=The+NoSQL+Movement%3A+The+Object+-+RDMBS+Incompatability+-+http://bit.ly/9viK3D+(via+@halwebguy)" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://halwebguy.danziger.net/2010/02/25/the-nosql-movement-the-object-rdmbs-incompatability/&amp;t=The+NoSQL+Movement%3A+The+Object+-+RDMBS+Incompatability" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://halwebguy.danziger.net/2010/02/25/the-nosql-movement-the-object-rdmbs-incompatability/&amp;title=The+NoSQL+Movement%3A+The+Object+-+RDMBS+Incompatability" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://halwebguy.danziger.net/2010/02/25/the-nosql-movement-the-object-rdmbs-incompatability/&amp;title=The+NoSQL+Movement%3A+The+Object+-+RDMBS+Incompatability" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://halwebguy.danziger.net/2010/02/25/the-nosql-movement-the-object-rdmbs-incompatability/&amp;title=The+NoSQL+Movement%3A+The+Object+-+RDMBS+Incompatability" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://halwebguy.danziger.net/2010/02/25/the-nosql-movement-the-object-rdmbs-incompatability/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<p>I could prove that I&#8217;m a dinosaur and say &#8220;are you out of your mind &#8212; No SQL?&#8221;  But then, I would be the one out of my mind.</p>
<p>I&#8217;ve always used relational databases and SQL.  In fact, SQL could probably be called my second language.  And while I don&#8217;t have the gripes that others may have with the language itself [<a href="http://www.kellblog.com/2010/02/24/the-database-tea-party-the-nosql-movement/">http://www.kellblog.com/2010/02/24/the-database-tea-party-the-nosql-movement/</a>], relational databases do come with a bag full of limitations and challenges.  I&#8217;ll tell you my gripe.</p>
<p>My biggest gripe is that I believe in object oriented programming, and RDBMS doesn&#8217;t play nicely in the OO sandbox.  Now of course, you could write your own data tier that calls stored procedures, or that has prepared statements.  But this is asking developers to write in a second language for your application.  This leads to ORMs, and for anybody who hasn&#8217;t worked with me, know now that I hate them for anything beyond simple CRUD operations.</p>
<p>But the biggest problem is effective modeling.  You cannot <em>effectively </em>model some object or hierarchical relationships with RDBMS.  For example, try to model n-deep dynamic menus in a relational database.  Each menu node has a parent, and each menu node falls within some order relative to the other items under the same parent.</p>
<div id="attachment_163" class="wp-caption aligncenter" style="width: 371px"><a href="http://halwebguy.danziger.net/wp-content/uploads/2010/02/menu_hierarchy.jpg"><img class="size-full wp-image-163" title="Example Menu Hierarchy" src="http://halwebguy.danziger.net/wp-content/uploads/2010/02/menu_hierarchy.jpg" alt="" width="361" height="303" /></a><p class="wp-caption-text">Example Menu Hierarchy</p></div>
<p>This is actually fairly easy to model in an RDBMS, but it is not very effective.  Each node has a parent node (except for the root node, which I left out for the sake of this example), and each node has a numeric ordering.</p>
<div id="attachment_167" class="wp-caption aligncenter" style="width: 166px"><a href="http://halwebguy.danziger.net/wp-content/uploads/2010/02/menu_hierarchy_table.jpg"><img class="size-full wp-image-167" title="Menu Hierarchy Table" src="http://halwebguy.danziger.net/wp-content/uploads/2010/02/menu_hierarchy_table.jpg" alt="Data Model for a Menu in a RDBMS" width="156" height="144" /></a><p class="wp-caption-text">Data Model for a Menu in a RDBMS</p></div>
<p>So here comes the problem.  What&#8217;s the SQL for selecting out your menu structure?  Since you do not know how deep the structure is (n-deep), you could do this with a crazy loop and some recursion.</p>
<ol>
<li>Get the root node [SELECT * from MenuNode where nodeParentNode is null]</li>
<li>Get all of the first level nodes [SELECT * from MenuNode where nodeParentNode=0 ORDER BY nodeOrder ASC]</li>
<li>For each node returned, get it&#8217;s children, recursively</li>
</ol>
<p>For the example menu hierarchy above, this would result in 1 SQL call to get the root, 1 call to get its children, 1 call for each of those 4 children to look for their children, two calls to get the children of D3a and D3b, two calls to get the children of D3bA and D3bB, and one call to find the children of D3bBi.  SQL round trips are expensive, and this is a lot of calls for a small menu.  This does not scale at all.  And this doesn&#8217;t even address the problem of maintaining order within each level of the hierarchy.  Of course, there are other ways to skin this cat.  nodeOrder could be replaced with nodeAbove, using more of a linked list type of structure, but that doesn&#8217;t work well either.  It would probably be more efficient to grab all the nodes in one sql call, and put them back together as you load them into a proper data structure, which in and of itself will take processing and time.</p>
<p>The bottom line is that it&#8217;s not a natural fit.</p>
<p>So, NoSQL people, tell me how you would do this using other tools?  CouchDB?  MongoDB?  Cassandra?  MarkLogic?  I presume this problem has been largely solved.  I still don&#8217;t believe that RDBMS is a bad tool.  You need to use the right tool for the problem you&#8217;re trying to solve, and be careful to minimize the total number of data persistence tools in your organization.</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 16px; width: 1px; height: 1px;"><img src="file:///C:/Users/HDANZI%7E1/AppData/Local/Temp/moz-screenshot.png" alt="" /></div>
]]></content:encoded>
			<wfw:commentRss>http://halwebguy.danziger.net/2010/02/25/the-nosql-movement-the-object-rdmbs-incompatability/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Google&#039;s New Math</title>
		<link>http://halwebguy.danziger.net/2009/02/11/googles-new-math/</link>
		<comments>http://halwebguy.danziger.net/2009/02/11/googles-new-math/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 02:54:57 +0000</pubDate>
		<dc:creator>halwebguy</dc:creator>
				<category><![CDATA[Product Management]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[marketing]]></category>

		<guid isPermaLink="false">http://halwebguy.danziger.net/?p=71</guid>
		<description><![CDATA[




		
			Tweet This!
		
		
			Share this on Facebook
		
		
			Share this on del.icio.us
		
		
			Share this on Reddit
		
		
			Stumble upon something good? Share it on StumbleUpon
		
		
			Subscribe to the comments for this post?
		






Do you see a problem here?  How does Google get away with this?  I&#8217;m pretty sure that if I made this mistake at work I would catch all bloody heck.  But then [...]]]></description>
			<content:encoded><![CDATA[

<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Google%26%23039%3Bs+New+Math+-+http://bit.ly/dl1enq+(via+@halwebguy)" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://halwebguy.danziger.net/2009/02/11/googles-new-math/&amp;t=Google%26%23039%3Bs+New+Math" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://halwebguy.danziger.net/2009/02/11/googles-new-math/&amp;title=Google%26%23039%3Bs+New+Math" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://halwebguy.danziger.net/2009/02/11/googles-new-math/&amp;title=Google%26%23039%3Bs+New+Math" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://halwebguy.danziger.net/2009/02/11/googles-new-math/&amp;title=Google%26%23039%3Bs+New+Math" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://halwebguy.danziger.net/2009/02/11/googles-new-math/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<p><a rel="attachment wp-att-75" href="http://halwebguy.danziger.net/2009/02/11/googles-new-math/google_counting1/"><img class="aligncenter size-full wp-image-75" title="google_counting1" src="http://halwebguy.files.wordpress.com/2009/02/google_counting1.jpg" alt="google_counting1" width="408" height="93" /></a></p>
<p>Do you see a problem here?  How does Google get away with this?  I&#8217;m pretty sure that if I made this mistake at work I would catch all bloody heck.  But then again, I&#8217;m not Google.</p>
<p style="text-align:center;">[polldaddy poll=1362581]</p>
]]></content:encoded>
			<wfw:commentRss>http://halwebguy.danziger.net/2009/02/11/googles-new-math/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pulling Out the Monkey Wrench</title>
		<link>http://halwebguy.danziger.net/2009/01/26/pulling-out-the-monkey-wrench/</link>
		<comments>http://halwebguy.danziger.net/2009/01/26/pulling-out-the-monkey-wrench/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 14:04:08 +0000</pubDate>
		<dc:creator>halwebguy</dc:creator>
				<category><![CDATA[Product Management]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[problem solving]]></category>
		<category><![CDATA[social networking]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://halwebguy.danziger.net/?p=36</guid>
		<description><![CDATA[




		
			Tweet This!
		
		
			Share this on Facebook
		
		
			Share this on del.icio.us
		
		
			Share this on Reddit
		
		
			Stumble upon something good? Share it on StumbleUpon
		
		
			Subscribe to the comments for this post?
		





You&#8217;ve heard it before.  And probably many times, too.  &#8220;They just threw a monkey wrench in my plans.&#8221;
Okay, so what now?  Sorry for stating the obvious, but pull it out.  I learned, [...]]]></description>
			<content:encoded><![CDATA[

<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Pulling+Out+the+Monkey+Wrench+-+http://bit.ly/ceIXDP+(via+@halwebguy)" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://halwebguy.danziger.net/2009/01/26/pulling-out-the-monkey-wrench/&amp;t=Pulling+Out+the+Monkey+Wrench" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://halwebguy.danziger.net/2009/01/26/pulling-out-the-monkey-wrench/&amp;title=Pulling+Out+the+Monkey+Wrench" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://halwebguy.danziger.net/2009/01/26/pulling-out-the-monkey-wrench/&amp;title=Pulling+Out+the+Monkey+Wrench" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://halwebguy.danziger.net/2009/01/26/pulling-out-the-monkey-wrench/&amp;title=Pulling+Out+the+Monkey+Wrench" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://halwebguy.danziger.net/2009/01/26/pulling-out-the-monkey-wrench/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<p>You&#8217;ve heard it before.  And probably many times, too.  &#8220;They just threw a monkey wrench in my plans.&#8221;</p>
<p>Okay, so what now?  Sorry for stating the obvious, but pull it out.  I learned, long ago, the difference between those that succeed and those that fail.  Those that succeed are the ones that can find a workaround, and don&#8217;t quit until they do.  Here&#8217;s some advice for how to do it.</p>
<ol>
<li><strong>Focus on the problem you&#8217;re trying to solve, not the problem caused by the wrench.<br />
</strong>I find that most wrenches aren&#8217;t problems at all, if you focus on the real problem.  Problem-solvers often get fixated in the details of their solution, and forget to consider other potential solutions.  I&#8217;ve seen this just about every week of my career, be it a technical problem or a business problem.  For example, let&#8217;s say you&#8217;re designing a car, and decide that it needs more battery power than any existing battery can provide.  Instead of trying to solve the problem of creating the most powerful car battery, why not see if you can use a two-battery solution?</li>
<li><strong>Don&#8217;t Go it Alone<br />
</strong>You don&#8217;t need to be a hero, and you&#8217;re not the smartest person you know (usually).  And even if you <em>are</em> the smartest person you know, others may be able to see things from another angle.  Don&#8217;t be afraid to ask for help; even from those who may not be experts in the area of your problem.  In fact, that can often be an advantage.</li>
<li><strong>Don&#8217;t Get Discouraged<br />
</strong>This is easier said than done.  But depression and frustration inhibit creativity.  If you find you&#8217;re getting down over a problem you&#8217;re trying to solve, it may be a good time for a small diversion.  I&#8217;m not suggesting laziness or avoidance, but something to help you walk away and return with a clear mind.  For example, if you&#8217;re editing your own writing, it&#8217;s best to walk away for a while and come back.  Otherwise, your mind may recall what you were <em>thinking</em> while you&#8217;re reading, and inadvertently ignore mistakes seen with your eyes.  Go watch a hockey game instead, and come back later.</li>
<li><strong>Extend Your Circle<br />
</strong>You asked your co-workers and friends, but they couldn&#8217;t help.  Don&#8217;t stop there.  Try your LinkedIn network (and build it up before you have a problem in the first place).  Ask you friends and co-workers to ask friends, or to give you names of people who could help.  Hire a consultant.  Post your problem on bulletin boards.  Hold a brainstorming session, and invite outsiders (offer beer and pizza).</li>
</ol>
<p>The bottom line is don&#8217;t quit.  Keep attacking the problem, and keep looking for help, but don&#8217;t let it consume you 24&#215;7.  Same of these things <em>may</em> <em>seem </em>obvious, but when the wrench is in the machine and the pressure is on, they could be forgotten, so it&#8217;s good to keep this handy.</p>
<p>Please post your suggestions too!</p>
]]></content:encoded>
			<wfw:commentRss>http://halwebguy.danziger.net/2009/01/26/pulling-out-the-monkey-wrench/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
