Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: So what's null then if it's not nothing?

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

From: vc <boston103_at_hotmail.com>
Date: 15 Dec 2005 16:15:55 -0800
Message-ID: <1134692154.971636.72460@g14g2000cwa.googlegroups.com>


Jon Heggland wrote:
> In article <1134679339.048493.78900_at_z14g2000cwz.googlegroups.com>,
> boston103_at_hotmail.com says...
> >
> > However, his subsequent analogy "After all, it is very common in
> > mathematics to label unknown values by letters such as m, n, x, y, z."
> > is not very enlightening. Nowhere did he say, though, that UNKNOWN is
> > a variable.
>
> He doesn't use the word 'variable', true. So it's not totally clear cut.
>
> > One can infer the 'variable' meaning from "The fact that the letters m,
> > n do not "look like" any of the integers does not prevent them from
> > actually having integer values in an expression such as m + n, m - n,
> > or an assertion that m * m = m.", but it would be a strange
> > interpretation.
>
> Hardly. The analogy must be that 'unknown' can actually *have* a truth
> value (true or false), which implies that it cannot actually *be* a
> truth value.

It is a truth value by virtue of its being used in Codd's truth tables.  Such use simply does not admit any other interpretation unless of course you want to redefine the very notion of truth table.

>
> > In fact, he said: "an RDBMS must be able to determine
> > whether NOT A, A OR B, and A AND B is true, false, or unknown when A,
> > or B, or both are unknown" which clearly means that 'unknown' is a
> > truth value a logical expression may evaluate to.
>
> Well, for integers, an RDBMS must be able to determine whether A + 1 is
> 2, 3, or unknown when A is 1, 2 or unknown, too. That doesn't mean that
> 'unknown' is an integer.

I suppose we can assume that 'w'/NULL/UNKNOWN are synonyms since it does not change anything as long as one understands the context in which the string of characters is used. NULL/UNKNOWN/w is clearly a member of the extended integer domain. How would you define the usual operations over such domain if NULL were not a member ?

> It is clear that a logical expression may
> evaluate to unknown, but it is *not* clear whether Codd considers this
> 'unknown' a regular truth value.

He stated unambiguously that 'w' (NULL/UNKNOWN) *is* a regular truth value by giving logical connective truth tables.

>.*I* think it is likely that Codd
> considered a 'missing' (null) boolean and the 3VL truth value UNKNOWN
> the very same thing.
>
> > > 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).
> >
> > How can you reconcile the idea of an element being a member of some
> > set/domain due to the fact that one can apply all the domain's
> > operations to the element and store the element along with other domain
> > values , and *at the same time* not being a member of such domain?
>
> That is how all other NULLs work! NULL is not a string or a number
> either, and if you apply operations to it, all you get is NULL.

A function is defined as a mapping matching each element of some set with a unique element of another, possibly the same, set. As long as one defines integer operations with NULL participation, one implicitely extends the original integer domain with the new element (NULL). Are you suggesting to abandon the fundamental notion of function as a mapping between sets (or alternatively, a relation between two sets) and create a new 'math' just to accomodate NULL ?

 >
> > Further, instead of having a three-valued logic, you've created a
> > four valued logic with some strange rules for its usual connectives
> > (How can one interpret the rule that TRUE OR 'YOUR_NULL' is no longer
> > true ?
>
> Just like you interpret that 0 * NULL is not 0.

I do not. I think such interpretation is nonsensical although formally admissible. TRUE OR NULL evaluating to NULL is even more insane.

>
> > How would you rationalize such OR ? Also, you did not solve
> > the problem with the truth tables being equal since they now contain
> > 'YOUR_NULL' which makes them incomparable.
>
> I just leave NULL out of the truth table. It is meta-information.

As I said earlier, you cannot define any operation using NULL (or any other entity) without NULL( or any other entity) being a member of some set. Unless of course, you want to create a new 'math' where the notion of function is something entirely different from the thing used in the traditional math.

And, sorry, 'meta-information' is really a very lame excuse.

> Alternatively, I can compare them using IS NULL.

I thought we've already been through that.

>
> > > > 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.
> >
> > I am not sure what you've suggested. Was that some truth table rows
> > (containing NULL) cannot be regarded as equal and yet the truth tables
> > can be considered equal ?
>
> Like I said, what you just described as sensible: That you can consider
> truth tables equal even when they contain NULLs.

So on one hand, you state that NULL is not equal NULL in the context of truth values, on the other hand you state that some truth tables containing NULL(s) are equal (" have every property in common"). How do you manage to reconcile these two assertions ?

The function you so adamantly desire is already there. It's called Kleene's biconditional. You do not need to give up on the simple notion of equality in the context of truth values, you do not need to talk about 'meta' stuff, you do not need to create a new math where NULL is not a member of any set. All you need to do is just to define another logical connective.

> --
> Jon
Received on Thu Dec 15 2005 - 18:15:55 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US