Re: 3vl 2vl and NULL

From: Hugo Kornelis <hugo_at_pe_NO_rFact.in_SPAM_fo>
Date: Thu, 15 Dec 2005 22:54:53 +0100
Message-ID: <dap3q1t254hp96r0ie9v450sfbis7btdjt_at_4ax.com>


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!

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.

>
>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

-- 

(Remove _NO_ and _SPAM_ to get my e-mail address)
Received on Thu Dec 15 2005 - 22:54:53 CET

Original text of this message