| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: 3 value logic. Why is SQL so special?
"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 Fri Sep 08 2006 - 17:34:18 CDT
![]() |
![]() |