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

From: Alexandr Savinov <spam_at_conceptoriented.com>
Date: Thu, 17 Nov 2005 12:12:09 +0100
Message-ID: <437c659a$1_at_news.fhg.de>


michael_at_preece.net schrieb:
> I've been accustomed to thinking of things either having a value or
> not. If something has no value then, to me, its value is null. Its
> value is an empty string (whatever "it" is). Different to having a
> value of zero. Different to anything with a value. Now, as I read up on
> SQL, I find that null is supposed to mean "unknown". I can't easily
> accept that. Does SQL's definition of null (unknown) include the null
> I'm familiar with (no value)? That doesn't make sense. If we know
> something has no value then its not an unknown value is it? I can't
> imagine having to write code where the "if a=b then result=true else
> result=false" construct won't work - according to what I'm reading, if
> either a or b is null then I should be setting result to unknown
> instead. Just can't get my head 'round that. Shouldn't things be a lot
> simpler? If something has an unknown value then at least we know
> whether it's null (as in an empty string) or not. To me, "unknown" can
> be compared with an empty string to see if it's null or not. Sorry -
> head is spinning.

Null is absence (== non-existence). If you will retreive a collection of objects then it will not contain null elements. Informally, this means that you do not see that object.

Why one might need objects that nobody sees and that cannot be retreived? The main idea is that you have many dimensions and the presence (existence) of objects can be exhibited separately along each of them. This means that an object (multidimensional) entity may exist and be visible/retreivable along one dimension and invisible (absent) along another dimension.

In contrast, unknown object is known to exist but we unaware of its identity which can be anything that is allowed for the domain.

Different data modeling techniques provide their own interpretations (sometimes inconsistent) for these two "values".

-- 
http://conceptoriented.com
Received on Thu Nov 17 2005 - 12:12:09 CET

Original text of this message