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

From: Jon Heggland <heggland_at_idi.ntnu.no>
Date: Fri, 2 Dec 2005 16:15:09 +0100
Message-ID: <MPG.1dfa835e8a57dea4989723_at_news.ntnu.no>


In article <1133524038.308500.314090_at_g47g2000cwa.googlegroups.com>, boston103_at_hotmail.com says...
>
> > I take this to mean that Codd's example is *not* a tautology (in 3VL),
> > whereas Codd claims that it is. In other words, a mistake on Codd's
> > part.
>
> Well, Codd claims no such thing. In fact, he says that the 3vl
> cannot express the tautology (obviously):
>
> "it evaluates the whole condition to be unknown. This is an example of
> a mild error.

It seems obvious to me that Codd claims that "x < 1960 or x = 1960 or x
> 1960" is a tautology ("the whole condition must be true for every
employee"). And I agree, in the real world and in 2VL (given the obvious domains and operator definitions, of course).

Now, if x is missing, 3VL will evaluate the expression to unknown. Codd says that this is incorrect ("a mild error"); and presumably he means that the answer should be true, and that tautology recognition ought to detect it. I don't see how you can dispute that.

C.-D. claims (referring to Lukasiewicz) that the expression is *not* a tautology, and thus *cannot* be recognized by a tautology detector (without redefining the 3VL system, (possibly) introducing "unfortunate effects"). As you say, he doesn't back it up, and I'm not skilled enough in 3VL to belabour the point. However, if Codd implicitly defined a 3VL different from Lukasiewicz' where the expression *is* a tautology, I think the burden of proof were on *him* to prove that this change has no deleterious effects.

> > of two 3VL-boolean expressions
>
> 3VL boolean expression is almost an oxymoron. If you mean equivalence
> of two 3VL formulas, then its determined in the same way as the 2vl
> wff equivalence: the truth tables should be the same.

Let me try an analogy. If, in Java, you say "if (4 == 2 + 2) ...", what is the if statement testing, equality or equivalence? Or does my question not make sense in some way?

> Two 3vl expressions are equal iff they are the same. E.g. (X and Y) =
> (X and Y).

So (X and Y) is not equal to (Y and X)? It seems that it is equivalence that is relevant for the discussion at hand, which makes me very curious why you claimed I was confused when referring to the 3VL equivalence definition. I'll chalk it up to a misunderstanding.

> > Would you say that 0 <=> 0? Would you say that 0 = 0?
>
> If the first zero denotes a logical constant, then yes. I do not know
> what zero denotes in the second case, so the answer is , "I do not
> know"..

I rather obviously meant the zero to denote the very same logical constant in both statements. But I don't understand why you'd say "I don't know" in the second case. How can 0 and 0 not "have every property in common"? Barring strange definitions, of course.

> > I'll ask you again: Do you claim that when null is encountered as a 3VL
> > boolean (lukasiewiczian?), Codd says null = null should yield true?
>
> Of course, as a logical constant, null=null evaluates to true (assuming
> our 3vl logical constants set is {true, false, null} with the usual
> truth tables): it denotes the same thing on both side of the '=' sign.

Finally! Thank you. This is what I have been trying to get at for ages with the discussion on equality and equivalence.

> No one uses the equality explicitly, since it's blindingly obvious.

Based on his article, it is *not* blindingly obvious (to me) that Codd means null=null should ever evaluate to anything but unknown. That is the core of my argument, and probably the reason why this discussion has gone on for so long.

> So the standard Boolean logic that uses 0 and 1 as logical constants is
> badly designed ?

If it were common to mix integer arithmetic and boolean logic in the same formulae, yes! Fortunately, it is not---but such a mix of null as 3VL truth value and as missing value marker does indeed occur in SQL, and in Codd's article.

> I agree that reusing the same symbol for different
> purposes *may* be confusing, but that's a standard practice in math.

There are degrees of confusing reuse. It seems we are down to a matter of taste.

> If you carefully use NULL as an empty string designation within a
> string operations context, then no, there is no problem. .

Except that you then have no way to designate a string as missing!

> > I'll ask you yet again: Do you claim that when null is encountered as a
> > 3VL boolean (lukasiewiczian?), Codd (or SQL) says null = null should
> > yield true?
>
> As a logical constant, yes, as an unknown/missing value, no.

Can you back this up with quotes from the article, or the SQL standard?

> > Define 0, 1, 2 and = so that 0 = 0, 1 = 1 and 2 = 2. Or 1/2 = 1/2, for
> > that matter.
>
> I am missing something. Codd has a special eqaulity rule only for
> NULL, not for anything you've mentioned above (assuming you assum the
> standard meaning for those symbols).

I assume the 3VL meaning for the symbols; not that it matters much. You say Codd's rule that null=null is unknown has an exception for the case when null is a 3VL value. I request justification for that claim.

-- 
Jon
Received on Fri Dec 02 2005 - 16:15:09 CET

Original text of this message