Re: So what's null then if it's not nothing?
Date: 5 Dec 2005 07:54:28 -0800
Message-ID: <1133798068.172086.7660_at_g44g2000cwa.googlegroups.com>
Jon Heggland wrote:
> In article <1133736634.236543.68290_at_g43g2000cwa.googlegroups.com>,
> boston103_at_hotmail.com says...
[...]
> > 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!
So what ? What substance does equivalence as a logical connective add to the game ? It's just another truth table, that's all.
>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."
Supplying truth tables carries much more weight that the vague words "they should be treated uniformly" because the latter begs the question "what do you mean by 'uniformly' ?" whilst the former does not.
> > > 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.
I am not sure, as I said before, that the data type is so terribly important for storing data. TTM does not provide any rationale for the must-be-supported data type.
>
> > > 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.
Forgetting for a moment about you bizzare insistence on calling a non-Boolean value Boolean, if I were to store a 3VL constant I would just do so regardless of what's it called NULL, UNKNOWN, 1/2, or something entirely different.
>
> > > 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?
I have no clue.
>
> > > > 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;
So what ? It's enough to define a *single* truth table, say, for AND, and it would have been clear that the strings he uses {true, false, w} are indeed logical constants.
> AND, OR and NOT is not sufficient. He
> could very well have envisioned an equivalence truth table where w<->w
> is w, not T.
He surely could, but it would be a strange thing to do as it would be a departure from the 2VL tradition. It's unclear what use such connective might have.
>
> > > "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?!
What utility storing "the result of the evaluation of a condition" might have except leading to data redundancy ? Presumably, all the true facts are already in the database.
>
> > > 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.
Not calling zero NULL is a matter of convention/tradition, nothing else.
>Come on, you should substantiate your claims.
A very simple example, integer 3 and 4 are not the same as rational 3 and 4 for obvious reasons, and yet using the same name for both does not cause any confusion. Why using NULL as logical constant and NULL as 'missing value' should present a problem ?
> --
> Jon
Received on Mon Dec 05 2005 - 16:54:28 CET