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

From: vc <boston103_at_hotmail.com>
Date: 19 Dec 2005 03:20:02 -0800
Message-ID: <1134991202.807776.49030_at_g14g2000cwa.googlegroups.com>


Jon Heggland wrote:
> In article <1134925992.542178.22230_at_z14g2000cwz.googlegroups.com>,
> boston103_at_hotmail.com says...
> >
> > > No, the set of truth values does not include NULL, just like the set of
> > > integers don't.
> >
> > How do you define addition over your integers then ? How do you
> > interpret 2 + NULL ? *What* is '+' in the expression ?
>
> "2 + NULL" is not a valid expression.

So what is your expression interpreter is supposed to do when it encounters expressions like that ? Throw an exception ?

>
> > > NULL is not a value, it is a property of a variable (or
> > > an expression).
> >
> > How do you define any operation with NULL over the domain if integers ?
>
> In short (and informally): null expressions propagate; if nothing is
> null, everything works as normal.

You are contradicting yourself, or your definition of 'valid' differs from the usual one. If the null 'propagates', then the expression '2+NULL' is agreeable to the expression evaluator (valid), in which case the question stands, what is '+' in the expression ?

>
> > > Metadata.
> >
> > Please provide a definition of the word 'metadata' applicable to NULL
> > and explain how relevant such definition is to the operation of integer
> > addition.
>
> A variable's value is the data. Information *about* the variable---e.g.
> whether it's constant, passed by value or reference, its physical
> storage characteristics, whether it has been assigned a value, or is
> null, is metadata. And it is not relevant. I don't change integer
> addition.

If you admit expressions like '2 + NULL', then you do.

>
> > > I disagree with their presentation. To use truth tables to show how null
> > > expressions work with boolean operators leads people to believe that
> > > NULL is a (truth) value.
> >
> > How would you define, say, OR when one of the operands is NULL ? What
> > exactly is 'OR' in an expression like TRUE OR NULL ?
>
> "TRUE OR NULL" is not a valid expression.

See above.

>
> > > And I'm not saying I necessarily agree with their position, but I
> > > understand the justification for that position. Given the way NULL works
> > > in other contexts in SQL, I think the 'boolean NULL' makes sense.
> >
> > Please explain what you mean by 'I think the 'boolean NULL' makes
> > sense' (provide an example).
>
> I mean that it fits into the pattern of how NULL is treated elsewhere in
> SQL. Other approaches break NULL propagation, and/or require truth value
> columns (and expressions) to be NOT NULL.

So the expressions like 'FALSE AND NULL' and 'TRUE OR NULL' are boh agreeable to the expression interpreter, despite being 'invalid', and evaluate to NULL ? What are the 'OR'/'AND' words in the expressions ?

>
> > > > Also, ok, you forbid expressions like FALSE AND NULL, but what does it
> > > > change ? How do you evaluate (1=0) AND (x>y), where x or y happen to
> > > > be NULL ?
> > >
> > > The change is just for making it clear(er) that NULL is not a value.
> >
> > What is gained at the logical/algebraic level by 'making it clear(er)
> > that NULL is not a value' ?
>
> Hopefully, endless discussions such as this one are avoided. As you
> might remember, the presence of null/w in a truth table was your
> principal argument against my interpretation of Codd.

How do you avoid NULL presence in a truth table ?

> --
> Jon
Received on Mon Dec 19 2005 - 12:20:02 CET

Original text of this message