Re: 3vl 2vl and NULL

From: Jon Heggland <heggland_at_idi.ntnu.no>
Date: Mon, 26 Dec 2005 11:28:08 +0100
Message-ID: <MPG.1e19e41f996a52d3989761_at_news.ntnu.no>


In article <cjbuq15agpo8r73kqu641crkoq72nms8ht_at_4ax.com>, hugo_at_pe_NO_rFact.in_SPAM_fo says...
> Hi Jon,
>
> I guess that our disagreements are caused by discussing two similar but
> not equal subjects. I was talking about the behaviour of NULL in SQL
> DBMSs; you were talking about the RM.

No, not at all. I am talking about NULLs as used by SQL/Codd; specifically whether they mean 'unknown' or nothing at all.

> IMO, any model that forces the result of a join to have just one
> predicate can't have a NULL symbol. At least not the NULL as it is
> defined and used in the SQL model. Since NULL signals missing data, it
> also signals that part of the predicate does not apply to a specific
> row.

That's where we disagree. You can sort of salvage the predicate by treating the NULLs as unknown (but existing).

> >Age
> >----
> >NULL
> >
> >What does that mean?
>
> That row should not be in the projection on Age. NULL doesn't signal a
> "NULL age" (whatever that might be), but "no data in the Age column for
> this row". The project operation projects data that is there, not data
> that isn't there.

Yet SQL keeps that NULL in the projection, and we are discussing how SQL NULLs should be interpreted. If you interpret it as 'unknown', it makes some sort of sense: There is a family member with an unknown age.

Of course, it is possible to define a different kind of NULL that doesn't mean anything, and doesn't show up in projections, but that is not the SQL NULL.

> (FYI, in NIAM, there would be one predicate like I used in my reply for
> the model, and all ages used anywhere in that model would reference this
> predicate.)

I find this a bit strange. Wouldn't that predicate be pointless, since all natural numbers are ages?

-- 
Jon
Received on Mon Dec 26 2005 - 11:28:08 CET

Original text of this message