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

From: Evan Keel <evankeel_at_sbcglobal.net>
Date: Fri, 08 Sep 2006 22:34:18 GMT
Message-ID: <KdmMg.9559$yO7.4426_at_newssvr14.news.prodigy.com>


"Karen Hill" <karen_hill22_at_yahoo.com> wrote in message news:1157742315.903040.15430_at_b28g2000cwb.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?
>
> Why do nulls make us feel so strange?
>

As you know, 3 valued logic is simple: true, false, don't know. The problem with null is that it is often used as a default value which is almost always surely wrong. Null does not mean N/A, or missing. That's why you can't do arithmetic with it. Null is a semantic construct that started out correctly and ended up in most RDMS implementations. FWIW, I try to create subtypes where there are no nulls.

Evan Received on Sat Sep 09 2006 - 00:34:18 CEST

Original text of this message