Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Useful Oracle books - C.J. Date theory vs. practicality
Ah, nulls...
One system I worked on had several columns with the following COLUMN_A VARCHAR2(15) NOT NULL w/Check constraint value in (<list of values>, 'NULL') ARGH!
I think one of the issues is that many (perhaps most) people do not understand the implementation of NULL in Oracle. The above example is just one of several common 'beliefs' that I have seen. I wonder how much this has to do with the tendency (at least what I perceive) to think of 2-valued logic when it comes to TRUE/FALSE and to avoid ambiguity. "Is the sun shining?" "Of course it is" (when I am sitting in an office where I cannot see out a window). The 'correct' answer is "I don't know, let's go to a window and check.", but that seems somewhat ridiculous to actually say in a conversation.
I started my career as a COBOL programmer. IIRC, I never left a data field as 'NULL' (I don't even remember if COBOL has such a concept). We used high values, low values, spaces, 0, etc. Even the little bit of C I did years later, uninitialized variables were treated as having a value, we just did not know what the value was before using the variable. With Oracle, NULL represents no value. So, which is closest to the meaning of NULL? Is it "unknown value" or "no value". In 3-valued logic, it seems that the two are equivalent. Is it a matter of semantics? Or am I so off-base that I should just go back to my bottle of Scotch and stay out of this?
<change topic>
This is why I think this list is so important. A free exchange of ideas, often with disagreements. Whether you agree or not with the
other person, you have been exposed to something different and have learned from it.
To paraphrase Wayne & Garth, "List On, Lex. List On, Dan"
;)
Regards,
Daniel Fink
![]() |
![]() |