<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: NULL Conclusion</title>
	<atom:link href="http://blog.afoolishmanifesto.com/archives/932/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.afoolishmanifesto.com/archives/932</link>
	<description>fREWdiculous!</description>
	<lastBuildDate>Fri, 30 Jul 2010 15:07:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Theory</title>
		<link>http://blog.afoolishmanifesto.com/archives/932/comment-page-1#comment-234</link>
		<dc:creator>Theory</dc:creator>
		<pubDate>Wed, 15 Jul 2009 15:37:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.afoolishmanifesto.com/?p=932#comment-234</guid>
		<description>What Ovid said. Unfortunately, NULLs are a necessary evil given todays’s architectures. Do what you can to avoid them, and be very specific in your interpretation of them when you have to have them.

Fortunately, a large percentage of columns are text types, in which case you have the beauty of the empty string so that you can avoid NULLs in pretty much any text column.

—Theory</description>
		<content:encoded><![CDATA[<p>What Ovid said. Unfortunately, NULLs are a necessary evil given todays’s architectures. Do what you can to avoid them, and be very specific in your interpretation of them when you have to have them.</p>
<p>Fortunately, a large percentage of columns are text types, in which case you have the beauty of the empty string so that you can avoid NULLs in pretty much any text column.</p>
<p>—Theory</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ovid</title>
		<link>http://blog.afoolishmanifesto.com/archives/932/comment-page-1#comment-233</link>
		<dc:creator>Ovid</dc:creator>
		<pubDate>Wed, 15 Jul 2009 09:16:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.afoolishmanifesto.com/?p=932#comment-233</guid>
		<description>It&#039;s worth pointing out that the link I presented shows a technique which has some significant drawbacks.  First, decomposition into sixth normal form can be excellent (in the &quot;correctness&quot; sense), but in practice, it&#039;s not going to be performant for larger systems (yeah, yeah, I know about premature whatever :) and it&#039;s certainly going to impose a significant cognitive load on the programmer as they have to do a heck of a lot more joins unless a clean view is layed over the top.

Second, the technique benefits from distributed foreign keys, something I&#039;m not aware of any database supporting.  I suppose you could write triggers or stored procedures to handle this, but if you wanted them to be performant over large tables, I suspect you&#039;d have to create and manage your own indices.  (That being said, I&#039;d kill for distributed FKs in our work app).

So I&#039;d suggest that you never, never use NULLs.  Until you have to.  Then just use &#039;em sparingly.</description>
		<content:encoded><![CDATA[<p>It&#8217;s worth pointing out that the link I presented shows a technique which has some significant drawbacks.  First, decomposition into sixth normal form can be excellent (in the &#8220;correctness&#8221; sense), but in practice, it&#8217;s not going to be performant for larger systems (yeah, yeah, I know about premature whatever <img src='http://blog.afoolishmanifesto.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  and it&#8217;s certainly going to impose a significant cognitive load on the programmer as they have to do a heck of a lot more joins unless a clean view is layed over the top.</p>
<p>Second, the technique benefits from distributed foreign keys, something I&#8217;m not aware of any database supporting.  I suppose you could write triggers or stored procedures to handle this, but if you wanted them to be performant over large tables, I suspect you&#8217;d have to create and manage your own indices.  (That being said, I&#8217;d kill for distributed FKs in our work app).</p>
<p>So I&#8217;d suggest that you never, never use NULLs.  Until you have to.  Then just use &#8216;em sparingly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Theory</title>
		<link>http://blog.afoolishmanifesto.com/archives/932/comment-page-1#comment-232</link>
		<dc:creator>Theory</dc:creator>
		<pubDate>Tue, 14 Jul 2009 19:39:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.afoolishmanifesto.com/?p=932#comment-232</guid>
		<description>Didn&#039;t get to your previous post before you wrote this one, but I agree with your assessment here: NULLs should be pretty rare anyway, as values are usually required.

The problem comes down to what NULLs actually mean, as Ovid says. Technically, the mean &quot;the value is unknown.&quot; This is distinct from, &quot;the value is known, and it&#039;s a non-value.&quot; From a semantic point of view, how your application treats these two interpretations may be the same, in which case you have no problems with NULLs. I find that such is usually the case.

In some situations, however, the distinction becomes important, and then you need to do something about it. The nice thing about an empty string in a text column is that it encompasses the distinction beautifully (an empty string is a known value), while the truthiness is the same (in Perl) for both an empty string and a NULL. I only wish that SQL had a way to represent the distinction in non-text types. But long term, as folks moved toward the &lt;a href=&quot;http://en.wikipedia.org/wiki/Sixth_normal_form&quot; rel=&quot;nofollow&quot;&gt;sixth normal form&lt;/a&gt;, NULLs and their inherent ambiguity will be, in practice, eliminated.

—Theory</description>
		<content:encoded><![CDATA[<p>Didn&#8217;t get to your previous post before you wrote this one, but I agree with your assessment here: NULLs should be pretty rare anyway, as values are usually required.</p>
<p>The problem comes down to what NULLs actually mean, as Ovid says. Technically, the mean &#8220;the value is unknown.&#8221; This is distinct from, &#8220;the value is known, and it&#8217;s a non-value.&#8221; From a semantic point of view, how your application treats these two interpretations may be the same, in which case you have no problems with NULLs. I find that such is usually the case.</p>
<p>In some situations, however, the distinction becomes important, and then you need to do something about it. The nice thing about an empty string in a text column is that it encompasses the distinction beautifully (an empty string is a known value), while the truthiness is the same (in Perl) for both an empty string and a NULL. I only wish that SQL had a way to represent the distinction in non-text types. But long term, as folks moved toward the <a href="http://en.wikipedia.org/wiki/Sixth_normal_form" rel="nofollow">sixth normal form</a>, NULLs and their inherent ambiguity will be, in practice, eliminated.</p>
<p>—Theory</p>
]]></content:encoded>
	</item>
</channel>
</rss>
