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

From: Gene Wirchenko <genew_at_ocis.net>
Date: Mon, 18 Sep 2006 12:38:00 -0700
Message-ID: <ncttg21le624ko72tj99fa2kpvuf9l41ic_at_4ax.com>


Volker Hetzer <firstname.lastname_at_ieee.org> wrote:

>Gene Wirchenko schrieb:
>> Volker Hetzer <firstname.lastname_at_ieee.org> wrote:
>>
>> [snip]
>Pity.
>
>>> What I don't understand is that everyone who decries nulls, somewhere
>>> works with default values. Ok, big deal, NULL is an universally applicable
>>> default value that cannot be confused with real data.
>>> What am I missing?
>>
>> That it can be confused with real data.
>How?
>Every interface worth its name has either a special flag or allows the mapping
>to a certain value upon reading it out of the database. And if not, then, at
>least in oracle, I can create a simple boolean (C convention) flag in the select
>list: select expr, nvl2(expr,0,1) Expr_Is_Null ...

     This means that there is no just getting the value. Now, you have to check everything for NULL. Quite the mess.

>> For one thing, NULL is
>> *NOT* a value. It is the absence of a value.
>Conceptually, so is any other default value. Only, with NULL, the database agrees.

     Nonsense. NULL is not a value. A default value is a value.

>With other default values I have to code it all in the sql.

     Yes, you set the default.

Sincerely,

Gene Wirchenko
Computerese Irregular Verb Conjugation:

     I have preferences.
     You have biases.
     He/She has prejudices.
Received on Mon Sep 18 2006 - 21:38:00 CEST

Original text of this message