Re: NULLs: theoretical problems?

From: JOG <jog_at_cs.nott.ac.uk>
Date: Sun, 12 Aug 2007 19:21:30 -0700
Message-ID: <1186971690.979746.159320_at_l70g2000hse.googlegroups.com>


On Aug 8, 11:43 am, "sinister" <sinis..._at_nospam.invalid> wrote:
> Many discussions point out one deficiency of NULLs: that they collapse
> multiple, distinct concepts into one ("no value possible," "value missing,"
> "value not available at this time", etc).
>
> What are the other theoretical problems? My impression from skimming some
> threads in this ng is that some anomalies might occur, maybe having to do
> with NULLs and joins, or NULLs and keys composed of more than one field, but
> I'm not sure.

A database stores true propositions. A statement with a hole in it (an SQL null) is not a proposition, and hence is a theoretical abhorrence.

Or from a different angle you might want to consider that a relation is a set of tuples. A tuple must contain a value in every position, or it is not a valid tuple (not being a subset of the cartesian product of the domains being considered). Hence an SQL-null is a theoretical abhorrence.

The solution is of course to decompose a relation around its key so that no nullable columns are required. This results in a schema with more relations, and tends to produce queries with more joins, but without any theoretical or logical flaws.

Some view such decomposition as being computationally inefficient, others reply that this is a physical implementation issue and not a concern of the logical model.

Given the fact that it can generate much longer queries, I sometimes find myself allowing nulls in personal home-brew projects out of sheer laziness. However I do suffer from internal pangs of guilt during the process ;) Received on Mon Aug 13 2007 - 04:21:30 CEST

Original text of this message