| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: So what's null then if it's not nothing?
David Cressey schrieb:
> <michael_at_preece.net> wrote in message
> news:1132207394.336133.241390_at_g44g2000cwa.googlegroups.com...
>
>>I've been accustomed to thinking of things either having a value or >>not. If something has no value then, to me, its value is null. Its >>value is an empty string (whatever "it" is). Different to having a >>value of zero. Different to anything with a value. Now, as I read up on >>SQL, I find that null is supposed to mean "unknown". I can't easily >>accept that. Does SQL's definition of null (unknown) include the null >>I'm familiar with (no value)? That doesn't make sense. If we know >>something has no value then its not an unknown value is it? I can't >>imagine having to write code where the "if a=b then result=true else >>result=false" construct won't work - according to what I'm reading, if >>either a or b is null then I should be setting result to unknown >>instead. Just can't get my head 'round that. Shouldn't things be a lot >>simpler? If something has an unknown value then at least we know >>whether it's null (as in an empty string) or not. To me, "unknown" can >>be compared with an empty string to see if it's null or not. Sorry - >>head is spinning. >> >>Mike. >>
Just to complete this example:
Unknown value should be used, for example, if the person would refuse to report who concretely is his spouse (or the name was forgotten). In this case he will be added to a list of married persons (because the spouse exists although unknown). In the case of null he will not be added to this list (he will be invisible).
> The theorists in c.d.t are going to come out in droves and try to teach me
> that, properly normalized, the circumstance I describe cannot occur. Save
> it, theorists. We've been there before. You're right, but you miss the
> point. Let's move on.
As I noticed in a parallel post the position that nulls can be and even should be avoided is simplistic. Nulls are a part of our world because they reflect the absence of things. We should not afraid of them. Our fears come from misunderstanding and inappropriate data modeling techniques and practices. (People tend to avoid what they do not understand and what they suffer from.) Nulls is a big head ache for data theorists and therefore they try to simply prohibit it.
-- http://conceptoriented.comReceived on Thu Nov 17 2005 - 09:03:34 CST
![]() |
![]() |