Re: 3vl 2vl and NULL

From: Jon Heggland <heggland_at_idi.ntnu.no>
Date: Fri, 9 Dec 2005 23:34:03 +0100
Message-ID: <MPG.1e0424c6c419775b98973b_at_news.ntnu.no>


In article <36dhp1dv7d9r2r2ujp4qeor3cnunbsmp8m_at_4ax.com>, hugo_at_pe_NO_rFact.in_SPAM_fo says...
>
> Interesting here is that Date changes Codd's definition "value is
> missing" to something that suits his argument better ("value unknown").
> He doesn't explicitly mention this change, nor does he defend this
> change with as much as one word.

My problem with Codd here is that "value is missing" is not a definition or a meaning. It is a *fact*; anyone can see that the value is missing, like an empty cell in a spreadsheet. But what does it *mean* that it is missing, why is it missing? I find the answer "it just means that it is missing" circular and unsatisfying.

> In my opinion, Codd should have sticked to his original model. NULL is
> not "value unknown", not "value does not apply". NULL is "no value".

Be that as it may, SQL does create some meaning through the way its operators work. Is NULL greater than 7, or less than it? SQL answers "don't know". In my opinion, it is very reasonable to assume then that NULL in this case is a number (otherwise the comparison engine ought to report an error), but nobody knows what it is. It is unknown.

> "The age of Aunt Marge is 47 years" is a fact.
> "The age of Uncle Vernon is unknown" is also a fact - but it's not the
> same fact type as the former.

Then what is the interpretation of the tuple (Uncle Vernon, NULL), given your interpretation of (Aunt Marge, 47)?

> But the database itself can not make any of these interpretations. For
> the database, NULL should never mean anything more than "no value here".

Then it shouldn't define operators for it, IMO. It should throw an exception whenever it encounters one, except for "IS [NOT] NULL" checks.

-- 
Jon
Received on Fri Dec 09 2005 - 23:34:03 CET

Original text of this message