The Nature of NULL

"Is not the beginning of wisdom the words: 'I do not know'?"—Data, Star Trek: Next Generation, "Where Silence Has Lease"


If the beginning of wisdom is to realize what it is that we do not know. NULL, by its definition, is this not knowing. We do not know what NULL is, this is why it is NULL.

What is Null?

NULL ModemNull is not a number, or letter. It may not even be a character. Using Occam's razor, things are either NULL or NOT NULL. Things that are NULL are completely unknown. Things that are NOT NULL are not completely unknown.

I feel the hair splitting on my head, so let me explain one important point. Things that are NULL are not destined to stay that way. Where /dev/null/ is the black hole of output that we don't need, NULL is not the data equivalent of a black hole. Things that are currently NULL may become NOT NULL at any time, as soon as we know something about them. Pretty much anything really.

Empty String TheoryBall of String

Unlike string theory, which attempts to define the nature of the universe, the "empty string theory" is that empty strings are the same thing as NULL. They are not. If they were NULL, we would not know that they were strings. This seems quite clear. NULL is NULL and an empty string is NOT NULL.

"But wait!" I hear a database developer cry. "I can create a field in my database that is a string, and allow it to be NULL." And this is correct, but this is not a contradiction. When you allow a database field to be NULL you have allowed it to receive NULL as an input. But it may or may not give NULL as an output. Because we can put NULL into a variable, when we query for that variable, element, whatever, we may get NULL, or we may get an empty string or property defined value of that data type of the field, that just happens to be empty.

Continued on the next page Page 1 — Page 2

Article tags

Spread the word
Bookmark and Share
Profile image for Roy Hayward

Article Author: Roy Hayward

Roy studied chemistry and political science in college, and spent his early days in computers playing with them as a hobby, but discovered that they made a better career. Entering into the field as end user tech support, Roy move on to system and …

Visit Roy Hayward's author pageRoy Hayward's Blog

Read comments on this article, and add some feedback of your own

Article comments

  • 1 - Brian aka Guppusmaximus

    Dec 25, 2008 at 7:48 am

    Excellent Article...

    Thanks for the mental workout & the clarification.

Add your comment, speak your mind

Personal attacks are NOT allowed.
Please read our comment policy.

blogcritics lists for Jul 10, 2009

fresh articles Most recent articles site-wide

fresh comments Most recent comments site-wide

most comments Most comments in 24hrs

top writers Most prolific Blogcritics for June

top commenters Most prolific Commenters in 24 hrs