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

From: Jon Heggland <heggland_at_idi.ntnu.no>
Date: Sun, 18 Dec 2005 15:21:59 +0100
Message-ID: <MPG.1e0f8ef7f9ac0e3989755_at_news.ntnu.no>


In article <1134828509.355442.304890_at_z14g2000cwz.googlegroups.com>, boston103_at_hotmail.com says...
>
> > Jon 2: Good point; I do like my consistency. Hmm... Actually, I think
> > I'll drop the third truth value, and just have TRUE and FALSE. I'll call
> > this domain "Boolean". Of course, any expression can still be null.
>
> So you suggest dropping the UNKNOWN synonym from the set of truth
> values and keepeing only {TRUE, FALSE, NULL}.

No, the set of truth values does not include NULL, just like the set of integers don't. NULL is not a value, it is a property of a variable (or an expression). Metadata.

> >No literal expression can possibly be null---and to use
> > tables looking very much like truth tables to explain the exceptions to
> > null propagation is therefore not possible,
>
> I do not understand this either. Do you disagree with SQL'99 truth
> tables and at the same time state that you agree with their position
> ("I have reached SQL enlightenment") ?

I disagree with their presentation. To use truth tables to show how null expressions work with boolean operators leads people to believe that NULL is a (truth) value.

And I'm not saying I necessarily agree with their position, but I understand the justification for that position. Given the way NULL works in other contexts in SQL, I think the 'boolean NULL' makes sense.

> Also, ok, you forbid expressions like FALSE AND NULL, but what does it
> change ? How do you evaluate (1=0) AND (x>y), where x or y happen to
> be NULL ?

The change is just for making it clear(er) that NULL is not a value.

-- 
Jon
Received on Sun Dec 18 2005 - 15:21:59 CET

Original text of this message