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

From: Jon Heggland <heggland_at_idi.ntnu.no>
Date: Mon, 5 Dec 2005 12:40:28 +0100
Message-ID: <MPG.1dfe45843786ed75989728_at_news.ntnu.no>


In article <1133736634.236543.68290_at_g43g2000cwa.googlegroups.com>, boston103_at_hotmail.com says...
>
> 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.

There *shouldn't* be, but I interpret Codd as saying there is. You disagree. I base my view on explicit statements in his article; you on the fact that he uses truth tables. I think we both have exhausted our arguments.

> Sorry, one cannot get more specific than defining truth table as
> that's the only way to describe what the logical operations mean.

Of course one can. One can define the truth table for equivalence, for one thing! Or one can say "Despite using the same symbol w for both the unknown truth value and 'value at present unknown' nulls, and saying they should be treated uniformly, we treat them differently."

> No, it's not because in the context of logical constants UNKNOWN !=
> UNKNOWN is simply meaningless.

Perhaps, but it's easy to fall into the trap of thinking, "well, we don't know what they are (they're UNKNOWN), so we can't say if they're equal".

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

That's not my point. The point is that a DBMS should support a truth value datatype.

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

You have a SQL table with a (3VL) boolean column. You want to put NULL (UNKNOWN) into one row, and NULL (missing) into another.

> > I'd agree if Codd hadn't used the same symbol for reasons of uniform
> > treatment.
>
> "Uniform" is indeed an unfortunate word here.

What do *you* think it means?

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

No. He doesn't define equivalence; AND, OR and NOT is not sufficient. He could very well have envisioned an equivalence truth table where w<->w is w, not T.

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

It is strange to suggest that a DBMS should have the capability to store the result of the evaluation of a condition?!

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

For the exact same reason that we don't call zero NULL for the integer domain. Come on, you should substantiate your claims.

-- 
Jon
Received on Mon Dec 05 2005 - 12:40:28 CET

Original text of this message