Re: So what's null then if it's not nothing?

From: Hugo Kornelis <hugo_at_pe_NO_rFact.in_SPAM_fo>
Date: Sun, 20 Nov 2005 21:04:24 +0100
Message-ID: <>

On Sun, 20 Nov 2005 11:45:39 +0100, mAsterdam wrote:

>This is the current entry for [Null] in the c.d.t. gossary:
>> [NULL]
>> Roughly: a special marker that can be put in a place
>> inside a data structure where an actual value is expected.
>> Precisely what that marker means varies and there are at
>> least three possibilities that are sometimes assumed:
>> (1) "Unknown value" This means that on the place of the marker
>> there should actually be a value but this value is not known
>> at the present time. For example, if a 'name' field in a tuple
>> describing a person is 'null' then this person will have a
>> name but we don't know it.
>> (2) "Absent value" This means that the property that is
>> described by the value in question is simply not defined.
>> For example, if the 'shipping-date' field in a tuple
>> describing an order is 'null' then the order was
>> not shipped yet.
>> (3) "Whatever SQL says it means" The exact meaning is hard to
>> summarize briefly, but is a mixture of the previous two
>> interpretations and involves a value with three truth-values
>> ('true', 'false' and 'unknown').
>You have all really thought about how to talk about null.
>Are there reasons to change the entry?

Hi mAmsterdam,

(Disclaimer: I know this group is about databases in general. My answer is completely SQL-centric. Not because I believe it should be, but because it's the only kind of DB I know enough about to be able to say anything useful. Please keep that in mind when reading).

Yeah, I think there are. Though I disagree with Roy, Christopher, and Bernard about adding to the description. I'm more inclined to shortening it, since much of the definition above is actually an assumption that will only be true in some UoD's.

I like David's suggestion a lot better - marking (1) and (2) as inferences improves the definition. But it could be improved even more by simply removing the inferences completely.

Here's my suggestion:

>> [NULL]
>> Roughly: a special marker that can be put in a place
>> inside a data structure where an actual value is expected.
>> The NULL carries no other information than the fact that
>> there is no value at that specific place in the data structure.
>> There can be many reasons for the absency of a value, including
>> (but not limited to) the value being unknown, inapplicable,
>> impossible, or irrelevant. Which of thesse reasons apply in
>> a specific case might or might not be known to the owner of
>> the schema or the owner of the data, but can never be
>> inferred from the database, unless this reason is stored
>> as a seperate data element.
>> In SQL, NULL will by definition be excluded from any aggregate
>> function. All comparisons between NULL and anything else
>> (including NULL) are considered to be "Unknown" (see: three-valued
>> logic). All other expressions involving at least one NULL
>> evaluate by definition to NULL.

I didn't check the glossary, but I assume that there already is an entry for 3VL. Hence the cross-reference instead of a full explanation.

Best, Hugo


(Remove _NO_ and _SPAM_ to get my e-mail address)
Received on Sun Nov 20 2005 - 21:04:24 CET

Original text of this message