Re: NULLs: theoretical problems?

From: David Portas <REMOVE_BEFORE_REPLYING_dportas_at_acm.org>
Date: Mon, 20 Aug 2007 23:38:03 +0100
Message-ID: <UrydnQcHjpVTilfbnZ2dnUVZ8sqjnZ2d_at_giganews.com>


"Neo" <neo55592_at_hotmail.com> wrote in message news:1187641160.234792.278400_at_i38g2000prf.googlegroups.com...
>> > ... NULLs ... There are better and more consistent ways
>> > of describing missing values.
>>
>> Will you please elaborate on those methods you
>> consider better and more consistent? Thank you.
>
> Dbd, a lightweight db that represents things by creating a network of
> nodes (each equiv to an AND gate), has an alternative method of
> dealing with NULLs. It is simply, don't create nodes to signify that
> something is unknown because their absence already implies it.
>
> Suppose we store a person named john whose age is 30. Later, we want
> to store a person named mary but her age is unknown. In RMDB, we can
> 1) Refuse to enter a tuple for mary.
> 2) Enter a tuple for mary but incurr a NULL for age.
> 3) Redesign schema, add table T_PersonAge, move data, update code/
> queries, etc to avoid NULL.
>

4) Have the right schema to start with so that no problem arises.

-- 
David Portas, SQL Server MVP

Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.

SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--
Received on Tue Aug 21 2007 - 00:38:03 CEST

Original text of this message