List:General Discussion« Previous MessageNext Message »
From:Arthur Fuller Date:March 13 2009 11:35pm
Subject:Fwd: avoiding use of Nulls
View as plain text  
 Exactly the point. Michael, NULL *is* information. It means "unknown" and
that is in itself useful information. A common example:

A new employee is hired but which department she will work in is unknown. So
the data entry person enters all the known information and leaves the rest
until it has been clarified.

The alternative is even worse than the so-called NULL problem and the
alleged difficulty of querying against NULLable columns: in a case like that
described above, the only way to handle it is to create a fake row in the
foreign-key table, for "Department Zero" or somesuch. That immediately turns
every query into a more complex beast that it would otherwise have been.
Every single query must exclude this "zeroth" row; join a few tables all
exhibiting this problem and things get really crazy.

Not to mention the fact that these "zeroth" rows falsify reality and combine
fiction with fact. Even worse, the "-99999" approach means that you can't
impose a constraint on the column (such as "must be a positive integer".

And finally, I cannot believe that you really mean "no NULLS ever". Surely
you mean only FKs. Otherwise, how would you handle fax numbers for people
with no fax, or middle names for people with none?

Arthur


>

Thread
Fwd: avoiding use of NullsArthur Fuller14 Mar
  • Re: Fwd: avoiding use of Nullsmichael14 Mar
    • Re: Fwd: avoiding use of NullsJohan De Meersman15 Mar
  • Re: Fwd: avoiding use of NullsChris W15 Mar