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

From: vc <boston103_at_hotmail.com>
Date: 5 Dec 2005 07:28:33 -0800
Message-ID: <1133796513.475408.73030_at_g49g2000cwa.googlegroups.com>


Jon Heggland wrote:
> In article <1133736983.556193.140790_at_z14g2000cwz.googlegroups.com>,
> boston103_at_hotmail.com says...
> >
> > Jon Heggland wrote:
> > [...]
> > > "Whatever" should IMO include the (very fundamental) boolean domain, so
> > > NULL in the context of boolean should also mean an unknown/missing
> > > value.
> >
> > Did not notice that at first. Using NULL and Boolean in the same
> > sentence is as wrong as one can get. Boolean [algebra/logic/whatever]
> > means that one talks abot the 2VL propositional logic, any other
> > logical constant simply does not belong there.
>
> What do you call the domain { TRUE, UNKNOWN, FALSE }? And by the way,
> haven't you argued for ages that names don't matter?

Names do not matter, but the number of logical constants does. If it's more than two, then the logic is most certainly not Boolean.

>
> What is the type/domain of the expression following the keyword WHERE in
> SQL?
Clearly, the the expression is a 3VL formula as defined by the standard.

> Why should we be prohibited from storing values of this type/domain
> in the database?

We should not be prohibited, and the SQL'99 standard has the Boolean data type. I do not remember if the standard allows NULL for the data type. If it does, the data type name is a misnomer.

Also, the Boolean type usefulness for storing data in the database is arguably greatly exaggerated. Firstly, it can easily be modelled by just about any other already available data type and secondly using Boolean may (or may not) indicate some issues with the model itself. The database is supposed to store only *true* facts, every row is a true statement already, so why bother with Booleans except as a performance tool or a means to simplify the schema by decreasing the number of relvars/tables ?

>
> And if we did have a Boolean { TRUE, FALSE } domain in SQL, shouldn't we
> be able to assign NULL to an attribute of that type?

If we assign NULL to the attribute of the Boolean type, it ain't Boolean no more.

> --
> Jon
Received on Mon Dec 05 2005 - 16:28:33 CET

Original text of this message