Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: So what's null then if it's not nothing?

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

From: Hugo Kornelis <hugo_at_pe_NO_rFact.in_SPAM_fo>
Date: Wed, 30 Nov 2005 22:38:51 +0100
Message-ID: <dg5so1h1p4fprood6uboq5ff97g87o24h1@4ax.com>


On 28 Nov 2005 19:37:19 -0800, vc wrote:

(snip)
>A lot of confusion about NULL stems from the fact that it's unclear
>what NULL really means.

Hi vc,

The meaning of NULL is not unclear at all. Just check the ANSI specification. The meaning of NULL is, in plain English, "no data here".

All other conceived meanings of NULL are in fact just the interpretation of people of the meaning of a NULL. For a specific NULL, in a specific column in a specific data model, suuch interpretation might be warranted. But that should not be extended to believe that any such interpretation could ever hold for all NULLs. (Same as with non-missing values, actually. Can you tell me what the value 42 in a column means? No. But if the column is called "Size", the table is "Shoes" and the application is used in a shoe store that uses the European scale for shoe sizes, you do know what this 42 means - but you'll never contemplate that you now have some deeper insight in each 42 in any datebase anywhere in the world).

> Codd mentions two meaning: "value at
>present unknown" and "property inapplicable."

I believe that Codd made a mistake here. He confused "reason" with "meaning".

The only MEANING of null is "no data here". There can be many different REASONS why there is no data there (Codd mentions two, but the list is longer), but they are not encoded in the NULL itself. And they shouldn't be, becuase the REASON for the absence of said data is not in the same domain as the data itself.

If the REASON for the absence of a particular value is relevant for the users of the database, then it's an attribute in the data model and it should be stored as a seperate column in the table.

If the REASON for the absence of a particular value is not relevant for the users of the database, than it doesn't make sense to discuss it; just conclude that the value is missing and move on.

> In his later work,
> he introduced a 4VL based on the different kinds of nulls. Some
>researchers suggested even more possible meanings for NULL.

Yes - if you pursue the path chosen by Codd to the ultimate consequence, the whole thing soon collapses on top of you.

Let's face it - if the Test.Result column is nullable, and if we assume that Codd's idea of different nulls were implemented, than what would the domain for this column be? Something like {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, unknown, not applicable, test not yet taken, ...} I don't think that these values would all fit in an integer domain. And a domain that would accept these values would have trouble using arithmatic - so we can no longer calculate average grades.

But even worse than that - storing both the actual result (if there is a value for it) and the reason of it's absence (if it's absent) in the same column would violate first normal form.

Best, Hugo

-- 

(Remove _NO_ and _SPAM_ to get my e-mail address)
Received on Wed Nov 30 2005 - 15:38:51 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US