Re: So what's null then if it's not nothing?

From: Jon Heggland <heggland_at_idi.ntnu.no>
Date: Thu, 15 Dec 2005 17:00:24 +0100
Message-ID: <MPG.1e0bb17fe2f70efd98974e_at_news.ntnu.no>


In article <1134657782.044908.325470_at_g49g2000cwa.googlegroups.com>, boston103_at_hotmail.com says...
>
> > 1. The "obvious" problems you talk about are definitely not obvious to a
> > lot of people.
>
> You mean that there are people, including you, who might think that
> 'x equals y' even if x and y *do not* have every property in common?

Huh? No. I'm just saying that the SQL committee reads Codd the way I do.

> > 2. My interpretation of Codd, right or wrong, seems thus to be the most
> > commonly accepted.
>
> Well, being "most commonly accepted" is nothing to be proud of besides
> it is irrelevant.

Except as an indication that Codd *also* may have been as wrong as you claim the SQL committee and I are. And *that* was our initial argument: How to interpret Codd's article.

> > > the integer domain makes sense because we presumably do not know
> > > whether NULL represents the same values, one cannot do so in the
> > > domain of truth values where UNKNOWN (aka NULL) represents *the same*
> > > degree of truth (if one wants to have n degrees of truth, one uses
> > > n-VL). Therefore, sacrificing simplicity and common sense for the
> > > sake of 'uniformity' does not apper to be a very clever decision.
> >
> > Common sense isn't as common as one would like to think. And the
> > simplicity argument cuts both ways.
>
> So you claim that UNKNOWN does not represent the same degree of truth ?
> So, you reject not only the notion of truth table comparison, but
> deny any meaning ascribed to truth values for the sake of 'uniformity'.
> Cool.

*I* don't; I just point to what other people are saying. Codd, in his discussion with Date on the matter
(http://www.dbdebunk.com/page/page/1706814.htm), seems in fact to consider the unknown truth value to be a variable that in reality is either TRUE or FALSE, but we don't know what it is. So, again, I think your quarrel is with him (were he not dead).

As for "common sense", I just meant that for some people, it may very well be common sense that NULL = NULL is always UNKNOWN, not sometimes TRUE.
> > > Regarding 'uniformity', witness TRUE OR NULL evaluatiing to TRUE, not
> > > NULL as a uniformity purist would expect.
> >
> > Yes, and I do object to that.
>
> And you do not realize that by doing so you destroy entirely what's
> left of Lukasiewicz's (or Kleene's) logic (after you had removed the
> notion of logical equivalence) since the AND and OR truth tables are no
> longer what they used to be ? And it does not bother you that the
> commonly accepted interpretaion of OR as something being true if at
> least one operand is true does not work any more ? Most cool.

My preferred solution would involve an actual truth value called (e.g.) UNKNOWN, distinct from NULL, and equal to itself (of course). So my "destroying" logic would be limited to allowing truth value variables to be NULL, letting those NULLs propagate, and not considering NULL part of the truth value domain (or any domain at all).

> What I meant was that Oracle people were sensible enough to regard the
> expressions with the same truth tables, even containing nulls, as
> equivalent which is evidenced by the optimizer behaviour in spite of
> the nonsensical interface they present to the end user. They did not
> have much say in this matter but try and conform to the standard.

This is exactly what I suggested, and probably what the SQL committee intended. What is the problem?

-- 
Jon
Received on Thu Dec 15 2005 - 17:00:24 CET

Original text of this message