Re: The BOOLEAN data type

From: Paul Vernon <paul.vernon_at_ukk.ibmm.comm>
Date: Tue, 1 Apr 2003 13:35:05 +0100
Message-ID: <b6c156$q00$>

"Tony" <> wrote in message
> (--CELKO--) wrote in message
> > No, NULL is not the same as UNKNOWN and zero is not the same the empty
> > string.
> So what do we put in a NUMBER column when the value is unknown, if not
> NULL - we sure don't put a zero there.

Well obviously if a column of domain NUMBER needs to hold the value 'unknown', then the domain should rather be something like NUMBER_UKN. I.e. the union of all NUMBER values and the 'unknown' value.

> (NB
> I've never seen anyone add a third value like -1 or 'U' to represent
> UNKNOWN, they'd leave it NULL).

You've obviously not seen any of my databases... I only use NULLs if someone has a gun to my head...

> I don't think we should be denied a
> useful datatype on the grounds that we're not grown up enough to use
> it properly. Bad designers will just go ahead and misuse a NUMBER or
> VARCHAR column instead anyway.

User Defined Types anyone?

Paul Vernon
Business Intelligence, IBM Global Services Received on Tue Apr 01 2003 - 14:35:05 CEST

Original text of this message