Much ado about nothing

From: David Cressey <david_at_dcressey.com>
Date: Wed, 16 Oct 2002 15:43:52 GMT
Message-ID: <YOfr9.191$0I3.16276_at_petpeeve.ziplink.net>


It seems to me that the discussion about SQL and NULLS is degenerating.

At the outset, in any data representation scheme, it's generally useful to have a marker that indicates the absence of data, in a place where data is expected. Thus, in ASCII, we have code zero, the ASCII null character, which can be placed in a byte to indicate the absence of a character. Synchronous modems, which must continue transmitting even when there is nothing to convey, have an "idle" mechanism, to indicate this fact to the other modem(s) participating. As so on.

Mathematical relations have no need of the concept of NULLS, because tuples contain values, and only values.
Result tables in SQL may need the concept of NULLS, where mathematical
relations do not, because of the difference between SQL and mathematics.

The inclusion of "exceptional values" in domains is an entirely different matter from the use of NULLS in SQL.
This is a different layer of representation and interpretation entirely.

Many of the difficulties we experience with NULLS is due to the attempt to overload NULLS with explicit meaning. That is, we equate the failure to convey a message as being a message in and of itself. If we would simply agree that a NULL indicates the absence of data, and nothing more than that, we'd have a lot less trouble.

I'll close with a loose paraphrase from one of the Sherlock Holmes mysteries.

Holmes: We have yet to explain the unusual behaviour of the dog in the night.

Watson: The dog did nothing in the night.

Holmes: That was the unusual behaviour. Received on Wed Oct 16 2002 - 17:43:52 CEST

Original text of this message