Subject Re: [firebird-support] Why NULL <> NULL ?
Author Kjell Rilbe
Alan McDonald wrote:

>>Alan McDonald wrote:
>>
>>>>Often used example:
>>>>I don't know how much money you've got in your wallet, so the value is
>>>>NULL (unknown).
>>>>
>>>>You don't know how much money I've got in my wallet, so it's NULL, too.
>>>
>>>I've never thought of this as a good example.
>>>I have money in my wallet - it could be nothing or it could be
>>>$5 or $10 etc
>>>In the DB, if the field state is NULL - it NEVER has an unknown
>>>value in it
>>>of 5 or 10 - it has no value it's state is NULL. if it has 5 or 10 in it
>>>then it is NOT NULL.
>>
>>But the key here is that NULL means unknown (to others than the wallet
>>owner in the above example). So, to the wallet owner, the amount of
>>money in his/her wallet is NOT NULL (unless he/she hasn't counted it for
>>a while...), but to the rest of the world, it's NULL.
>
> ahhh, we need a consistent view on our data - you can't have a system which
> reports NULL to some people and NOT NULL to others based on who is asking.
> Alan

Yes, but I didn't think you were a DB engine Alan. I know I'm not. I was
thinking of the DB engine as "the world in general" for the purposes of
the example. And to the world in general, the contents of your wallet is
NULL (I hope...). SO, if noone's told the DB engine what the contents of
your wallet are, it will and should report NULL, even though it is NOT
NULL for you, Alan.

Kjell
--
--------------------------------------
Kjell Rilbe
Adressmarknaden AM AB
E-post: kjell.rilbe@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64