Re: 3 value logic. Why is SQL so special?

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Tue, 19 Sep 2006 12:16:14 GMT
Message-ID: <icRPg.22832$9u.272599_at_ursa-nb00s0.nbnet.nb.ca>


peter koch wrote:

> Bob Badour wrote:
>

>>Chris Lim wrote:
>>
>>
>>>Roy Hann wrote:

>
> [snip]
>
>
>>Then why have I had to spend so much time in my career explaining to
>>reasonably intelligent people why their queries returned the wrong answer?

>
> [snip]
>
>
>>I must insist you back up that statement quantitatively and
>>qualitatively. It is far easier to deal with two names than with
>>surprisingly inconsistent semantics for the same reason it is far easier
>>to deal with a compile-time error than a run-time error.

>
> [snip]
>
>>  But a
>>
>>>database without NULLs? It might be theorectically correct, but it
>>>would be a nightmare to write queries against.
>>
>>I disagree. My personal experience dealing with scores of intelligent
>>database users suggests that NULL is the nightmare.

>
> All these arguments against NULL are only valid against some specific
> implementations of that concept - here SQL in its various dialects.
> They are not arguments against the concept of having null-values (e.g.
> to represent unknown values) in some database system. And this is
> comp.databases.theory after all.

I have found the arguments against 3VL and NVL for N > 2 compelling. For example, if DEE and DUM are canonical relations for true and false, what are the canonical relations for the other logical values?

We currently have no theory that I am aware of for dealing with missing information. At this time, I cannot even imagine what such a theory would look like because science and the scientific method have such strong roots in empiricism. Hopefully someone much smarter than me will come up with a sound one, though.

The whole point of NULL is to have something other than a value to represent missing information. To use a value to represent unknown, what we really need are extensible data type systems that as much as possible enforce consistency. For example, if SUM is an aggregate of +, an extensible data type system should enforce consistent semantics + semantics for SUM. Received on Tue Sep 19 2006 - 14:16:14 CEST

Original text of this message