Re: NULLs: theoretical problems?
Date: Mon, 20 Aug 2007 22:03:25 -0700
Message-ID: <1187672605.337081.146590_at_r34g2000hsd.googlegroups.com>
> > 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.
Judging by the number of RMDBs in existence with NULLs, the right schema can be illusive initially. In the example above, in order to avoid a NULL for person's name, one needs to know that it can be missing when the schema is designed. With dbd, one does not need to know this to avoid NULLs. For example, below I add a person without a name of age 47.
(new) (set age instance (it)) (set (it) name '47) (new)
(set person instance (it))
(set (it) age 47)
With RMDBs, without the right initial schema, it might incur a NULL as
follows:
INSERT INTO T_Person (NULL, 47);
Received on Tue Aug 21 2007 - 07:03:25 CEST