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

From: JOG <jog_at_cs.nott.ac.uk>
Date: 11 Sep 2006 08:47:05 -0700
Message-ID: <1157989625.240604.102330_at_q16g2000cwq.googlegroups.com>


> X-No-Archive:yes
>
> I know that visual basic, lisp, python, c , c++ , perl, all have 2
> value logic. What makes SQL so special that it needs 3vl when all
> these langauges make do with 2vl?
>
> I read a book on SQL which was authored by Date before I knew of the
> whole Date controversy and when I was learning SQL. I was thoroughly
> confused when he went on a spiel about nulls. I echoed this sentiment
> at work and was chastized and told that Date is a kook. Yet I have
> some time later accepted nulls and work with them just fine. In the
> back of my mind though, coming from a C++ background I still feel that
> if c++ can make it on 2vl why not SQL?

Well, clearly it could, and indeed should. It is extremely simple to recognise Nulls as gibberish if one simply rewinds back to the proposition being recorded. Consider that

"The employee with empid 101 has a firstname John, lastname Doe and middlename NULL."

makes absolutely no sense in native english. Either one is trying to say:

"The employee with empid 101 has a firstname John and lastname Doe" AND
"The employee with empid 101 and has no middlename"

or trying to state that:

"The employee with empid 101 has a firstname John and lastname Doe" AND
"The employee with empid 101 does have a middlename, but we don't know what it is"

To this day, I don't see any relevance whatsoever for 3VL in recording these two distinct propositions. (There is of course a third option, where one doesn't know anything /at all/ concerning the person's middlename, but then why /on earth/ would you be trying to record something about it anyway?)

As ever its just bad design, generated by those who have no idea what the tool they are using actually does.

Thank god these people aren't building bridges. Received on Mon Sep 11 2006 - 17:47:05 CEST

Original text of this message