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

From: vc <boston103_at_hotmail.com>
Date: 2 Dec 2005 09:56:33 -0800
Message-ID: <1133546193.414342.230440_at_f14g2000cwb.googlegroups.com>


Jon Heggland wrote:
> 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.

Codd says that "Now, an obvious cure for this is to equip the DBMS not only with 3VL,
but also with the capability of recognizing for any whole condition whether it is a tautology."

My interpretation of his words is that he clearly realizes that the example is *not* a tautology in the 3vl, but it would have been in the 2vl, therefore, he wants to have a mechanism that would interpret a 3vl expression, in some cases, so that it would be a tautology in the 2vl knowing well that there cannot be a general tautology detection approach either in the 2vl or in the 3vl.

>
> 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.

But Codd did not redefine Lukasiewicz's 3vl. I readly admit that I might have misinterpreted his words, but he clearly separates the 3vl and the tautology detection mechanism (see his words above).

>
> > > 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?

Equivalence, of course.

>
> > 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)?

Obviously, it's not.

> 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.

You did not specify the meaning explicitely and I cannot rely on the standard interpretation in this sort of discussion.

>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.

Because, I do not know what '0' is in the second case.

>
> > > 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.

I cannot undestand how you came to this strange conclusion. Please provide facts for the conclusion that Codd thought that NULL=NULL always eavluates to UNKNOWN.

> > 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.

But in SQL, one never uses any logical constant explicitely {UNKNOWN, TRUE, FALSE} appear only in descriptions of how this or that should function.

>
> > 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 meant that, if you need to deal only with values of some domain (strings), not with unknown/missing markers thereof, there is no problem. Clearly, if one needs to name two different things/object/ideas in the same context/domain one would use two different labels.

The logic vocabulary exists in its own context and I personally do not see any problem in separating logic constants from any other domain labels. Are you as much confused when using the label 'a' as an English article, the first letter of alphabet, or a variable, or something else ?

>
> > > 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?

The standard, or the article, does not discuss elementary notions of logic. maybe they should, I do not know.

>
> > > 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.

It's not an exception. I'll try again one last time. NULL in the context of some domain of values, integers, characters, whatever, means an unknown/missing value (as defined by Codd and the SQL standard). NULL in the context of the 3vl is just another logical *constant* which has got nothing to do whatsoever with the meanning of NULL as a missing/unknown value. Substitute whatever string of characters you like most for NULL as a logical constant, and nothing will change.

>I request justification for that claim.
> --
> Jon
Received on Fri Dec 02 2005 - 18:56:33 CET

Original text of this message