Re: 3vl 2vl and NULL

From: Jon Heggland <heggland_at_idi.ntnu.no>
Date: Mon, 12 Dec 2005 13:06:18 +0100
Message-ID: <MPG.1e077c153499ce92989741_at_news.ntnu.no>


In article <aaepp1l4g1h3ud0imb120471k08g9rdaf0_at_4ax.com>, hugo_at_pe_NO_rFact.in_SPAM_fo says...
> On Fri, 9 Dec 2005 23:34:03 +0100, Jon Heggland wrote:
>
> > but nobody knows what it is. It is unknown.
>
> I would hasard a guess that at least Uncle Vernon knows his age. His
> parents, his wife and his children too.

Relevance?

> But *within the context of the database*, Uncle Vernon's age is indeed
> unknown. That's the result of the value for the proposition "Age of
> <person> is <age> years" being missing in the database.

This sounds like an agreement on that "value is missing" is essentially the same as "value is unknown". Or do you draw some separation between "unknown in the database" and "unknown in the real world"?

> >> "The age of Aunt Marge is 47 years" is a fact.
> >> "The age of Uncle Vernon is unknown" is also a fact - but it's not the
> >> same fact type as the former.
> >
> >Then what is the interpretation of the tuple (Uncle Vernon, NULL), given
> >your interpretation of (Aunt Marge, 47)?
>
> For (Aunt Marge, 47), my interpretation would be:
>
> - I have a family member who is uniquely identified (in the UoD of my
> family database) by the name "Aunt Marge";
> - My family member Aunt Marge has an age of 47 years.
>
> For (Uncle Vernon, NULL), my interpretation would be:
>
> - I have a family member who is uniquely identified (in the UoD of my
> family database) by the name "Uncle Vernon".

So the fact type for the one tuple is not the same as for the other.

It seems, though, that you use "fact type" in a manner unfamiliar to me. In the descriptions of the RM and predicate logic I have seen, "fact type" is synonymous with "predicate", and each relation has one (and one only, though different (equivalent) formulations are of course possible). (Though of course, NULLs have no counterpart in predicate logic that I'm aware of.)

But from you example, it seems a relation can have several (similar and overlapping) fact types (a number exponential to the number of attributes), and that different subsets are valid for different tuples. Is this a commonly accepted scheme? Is it an attempt to salvage the relationship with predicate logic in the face of NULLs?

> >Then it shouldn't define operators for it, IMO. It should throw an
> >exception whenever it encounters one, except for "IS [NOT] NULL" checks.
>
> That might possibly be a valid position from a theoretic POV, but it's
> definitely not valid from a practical POV. Suppose you search a jobs
> database for a job in the neighbourhood of (insert your city here) that
> does not require you to work more than 45 hours a week, would you want
> it to fail because two or three companies forgot to fill in the "hours
> to work" field on the form?

Definitely. I don't want the database to make an arbitrary decision on whether or not I will consider those companies. When I get the error, I can adjust my query to explicitly include or exclude those companies.

-- 
Jon
Received on Mon Dec 12 2005 - 13:06:18 CET

Original text of this message