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

From: vc <boston103_at_hotmail.com>
Date: 4 Dec 2005 14:50:34 -0800
Message-ID: <1133736634.236543.68290_at_g43g2000cwa.googlegroups.com>


Jon Heggland wrote:
[...]

> ... except if/when it is used as a truth value ..?

Here you go again. There is no relationship whatsoever betwee NULL representing an unknown vale and NULL representing a logical constant. By itself, it's just a meaningless string of characters until we define such meaning..

>
> > > Now *you* provide facts for the conclusion that Codd thought that
> > > NULL=NULL sometimes evaluates to TRUE.
> >
> > The very fact of using thruth tables to define logical operator
> > meanings says unambiguously : look, I have three logical constants
> > {true, false, null} (or { true, false,w) in Codd's notation) and here
> > how I define AND, OR, NOT connectives. If one says, that {true,
> > false, null} are *not* logical constants, then one talks about
> > anything whatsoever but logic.
>
> But this is very implicit. I put greater weight on the "uniform
> treatment" bit.

Sorry, one cannot get more specific than defining truth table as that's the only way to describe what the logical operations mean. One can talk about 'uniform treatment' all one wants, but what matters is the truth tables.

>
> > Let's assume Codd is confused, and he says NULL=NULL always evaluates
> > to unknown/NULL. Then he contradicts himself by using the truth tables
> > where NULL = NULL evaluates to TRUE by virtue of being a logical
> > constant and not an unknown value as it might be in other contexts.
>
> This contradiction is very implicit. And it is *possible* to define a
> 3VL system so that TRUE = TRUE and FALSE = FALSE but UNKNOWN != UNKNOWN
No, it's not because in the context of logical constants UNKNOWN != UNKNOWN is simply meaningless.

> (after all, we can define whatever we want); and the distinction between
> "we know it's unknown" and "we don't know what it is" is a bit hard to
> wrap your head around, IMO.

You just need to know what the standard 2vl propositional logic, not even FOL just PL, is about. The 3vl notions are quite similar.

> > They are not and that's the reason why using NULL in two different
> > contexts is not so much of a problem.
>
> But surely it has been proposed and discussed? I seem to recall an old
> article by Date where he criticizes the proposal precisely on the
> grounds that it used NULL for UNKNOWN.
>
> And it seems a curious omission indeed. TTM considers boolean the *only*
> datatype/domain that *must* be supported.

I imagine that TTM just does not need unknown because it uses the 2vl. I may be wrong though since it's been a while since I read TTM but I'd be very much surprised if I found out that they seriously contemplated using Codd's 3vl ;)

>
> > > And if you use NULL for the unknown truth value, how do you designate a
> > > missing one?
> >
> > But as I said multiple times, the real label is 'logic_context.NULL'
> > or 'integer_context.NULL', not just NULL.
>
> But if you had a boolean SQL type, how could you indicate which one you
> meant?

But you do not need to because the name (NULL) is used in different contexts. It's a bit of a silly discussion since I actually support the idea that the two notions'd better have different names (as I said somwhere in the discussion before), however, if you want to use the same name for both I do not see a problem. Could you give an example of such a problem ?

>
> > > Then what do you base your assertion on?
> >
> > On knowing what the logical constant is, very much in the same
> > fashion as you'd base your knowledge of '7 times 8 = 56' on being
> > acquainted with the multiplication table.
>
> I'd agree if Codd hadn't used the same symbol for reasons of uniform
> treatment.

"Uniform" is indeed an unfortunate word here.

>
> > > Codd says: "[W]hat is the truth value of x = y if x or y or
> > > both are null? An appropriate result in each of these cases is the
> > > unknown truth value, rather than true or false." This is his rule,
> > > whereas ...
> >
> > He talks about NULL in contexts *other* than that of logical constants.
>
> That's a strong assumption on your part.

It's not an assumption but a simple conclusion based on his using the truth tables to define the connectives.

>
> > > > I'll try again one last time. NULL in the
> > > > context of some domain of values, integers, characters, whatever,
> > >
> > > (Truth values is also a domain.)
> >
> > Right, it's a trivial observation, but so what ? It's a different
> > domain with different rules.
>
> "Whatever" should IMO include the (very fundamental) boolean domain, so
> NULL in the context of boolean should also mean an unknown/missing
> value.

It's a strange suggestion indeed. Could you like substantiate it ?

> Or why should that particular domain have different rules from
> all the rest?

And why not ?

>
> > > > 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.
> > >
> > > ... this is a different rule. Codd does *not* say this, and neither does
> > > the SQL standard, by your own admission.
> >
> > In Codd's case, it's stated by virtue of his using the truth tables.
>
> Very implicitly. And contradicted by the use of "w" instead of U. But
> I'm repeating myself, and I think we agree enough to let it go. :)

See above my remarks about truth tables importance.

As to 'w'... come on, whether it's called NULL, devil, or w is immaterial, what matters are the rules of the game defined by the truth tables.

> --
> Jon
Received on Sun Dec 04 2005 - 23:50:34 CET

Original text of this message