Re: 3 value logic. Why is SQL so special?

From: Chris Lim <blackcap80_at_hotmail.com>
Date: 18 Sep 2006 13:58:30 -0700
Message-ID: <1158613110.059626.258460_at_d34g2000cwd.googlegroups.com>


Roy Hann wrote:
> It's worse than that. Suppose one user can't be bothered to find out if the
> customer is insolvent and another user decides the null means insolvency or
> otherwise isn't a relevant attribute.

I don't see the problem with NULLs. Yes you have to be careful when using nullable columns in queries, but it's not the mess that you guys make out (at least not in practical terms). It's certainly easier (when writing queries) to deal with NULLs than to handle separate tables for every optional attribute, which is the proposed solution (considering how many NULLs there are in a 'typical' database, the number of extra tables is enormous).

This is one argument where the theory just does not seem to have a case, at least until SQL supports a better way of combining all the optional attributes of an entity together to make querying easier. I mean, with the whole surrogate key vs natural key debate I can see both sides to the argument, and even though I wouldn't do it personally, I can see how a database with purely natural keys could work. But a database without NULLs? It might be theorectically correct, but it would be a nightmare to write queries against.

Chris Received on Mon Sep 18 2006 - 22:58:30 CEST

Original text of this message