Re: NULLs

From: David BL <davidbl_at_iinet.net.au>
Date: Thu, 27 Dec 2007 18:49:04 -0800 (PST)
Message-ID: <a4673066-4176-4613-97c8-2e499273ba1f_at_i12g2000prf.googlegroups.com>


On Dec 28, 9:41 am, JOG <j..._at_cs.nott.ac.uk> wrote:
> On Dec 27, 11:31 pm, Hugo Kornelis
>
>
>
>
>
> <h..._at_perFact.REMOVETHIS.info.INVALID> wrote:
> > On Wed, 26 Dec 2007 23:17:52 -0400, Bob Badour wrote:
> > > Codd pointed out that a single NULL marker did not suffice and
> > >suggested 2 markers. Date pointed out that one can apply the same
> > >argument to 2 markers leading to an infinite progression once one heads
> > >down that path, which suggests the path was never a productive one to
> > >head down in the first place.
>
> > Hi Bob,
>
> > Unfortunately, both Codd and Date forgot that the NULL marker in (for
> > instance) the age column should represent only that the age is not on
> > file and not try to represent a reason for this as well.
>
> > Codd's suggestions to use two markers (for "not applicable" and
> > "unknown", IIRC) assumes that we want to store both the age of a person
> > (if on file), and the reason why an age is not on file (if it isn't).
> > That can of course be necessary - but in that case, we have two
> > attributes that should be stored in two seperate columns.
>
> > Attempting to store both the age and the reason why an age is unknown in
> > a single column violates first normal form.
>
> Is the Zaniolo approach you are favouring not doing exactly the same
> thing? Surely it is attempting to store both an age and the fact that
> an age is not on file in a single column, which also violates first
> normal form. It still appears to be a hack imo, and one still ends up
> with 3VL. There has to be a more elegant way....Regards, J.

IMO the Zaniolo approach should be interpreted using a large number of predicates with properly defined intensional definitions, allowing each tuple to be read as a set of propositions, each without any NULLs. In that sense it remains strictly within the confines of a 2VL.

Eg

    employee(P) :- It is known to HR department that P is an employee     age(P,A) :- It is known to HR department that P is an employee with age A

    married(P) :- It is known to HR department that P is a married employee

Then from tuple t = { Name=fred, Age=NULL, Married=true } we can read out all the following propositions

    employee(fred).
    married(fred).

The main thing to be careful with is the nature of projection. Eg it is not true that employee(P) is a projection from age(P,A). In logic we have

      exists A such that age(P,A) => employee(P)

but converse is false! Normally one would like to think of the converse as true (because every person has an age whether we know its value or not), but look at the intensional definitions: they stipulate that they only concern information known to the HR department. Received on Fri Dec 28 2007 - 03:49:04 CET

Original text of this message