Re: 3vl 2vl and NULL

From: Frank Hamersley <terabitemightbe_at_bigpond.com>
Date: Fri, 16 Dec 2005 00:49:39 GMT
Message-ID: <Daoof.11756$V7.8924_at_news-server.bigpond.net.au>


Hugo Kornelis wrote:
> On Thu, 15 Dec 2005 07:07:24 GMT, Frank Hamersley wrote:
>

>> Hugo Kornelis wrote:
>> 
>>> I object to the choice of words "It is unknown", because in fact
>>> Uncle Vernon's age IS known. Not to you and me, but it is known
>>> to many others.
>> 
>> It isn't known to the database so NULL is good enough for me!
>> 
>> If you want to underload more meaning than that, (i.e. it is
>> impossible for someones age to be unknown but that the database is
>> missing that knowable value) do it with NOT NULL and an age of -1
>> for instance.

>
> Hi Frank,
>
> Ugh! That would be a dirty hack!

Perhaps, but it would be non NULL. Of course it is still a special value because negative ages are not legitimate values from the domain.

> If you want to store information about the reason why a value is
> missing, you'll have to use a seperate column for it. After all, the
> predicates for "Age of a Person" and "Reason why Age of a Person is
> missing" can't possibly be combined into one predicate.

I agree - if I were desperate to record the distinction I would do the same. If I were not I would simply use NULL.

>> BTW Uncle Vernons age is a really bad thing to be storing in a
>> database! Why you ask - because since it was last recorded he has
>> probably had a birthday and if not that then at least one sleep
>> even if it is on the couch after Christmas dinner :-).

>
> Agree. But it makes for much more readable examples that birthdates.
>
> (In a real DB, I wouldn't use "Unclue Vernon" as a single-column
> primary key either)
>
> Best, Hugo

Cheers, Frank. Received on Fri Dec 16 2005 - 01:49:39 CET

Original text of this message