RE: Useful Oracle books - C.J. Date theory vs. practicality

  • From: "Lex de Haan" <>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 28 May 2004 20:54:51 +0200

Hi Daniel,

there is one subtle difference between COBOL (cum suis) and SQL,
with regards to leaving fields empty. COBOL doesn't have three-valued logic.

just for fun, check out these two commands:

IF     (some condition) THEN (statement 1) ELSE (statement 2);
IF NOT (some condition) THEN (statement 2) ELSE (statement 1);

regardless the contents of your data structures,
in COBOL these two are equivalent but in PL/SQL they are not!

and another "regardless" statement:
regardless how far you are off-base,
it always makes sense to stay close to a bottle of Scotch...


visit my website at

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of Daniel Fink
Sent: Friday, May 28, 2004 19:35
To: oracle-l@xxxxxxxxxxxxx
Subject: 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

N:de Haan;Lex
FN:Lex de Haan
ORG:Natural Join B.V.
ADR;WORK:;;Pieter Breughelstraat 10;Utrecht;;3583 SK;Netherlands
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Pieter Breughelstraat 10=0D=0AUtrecht 3583 

Other related posts: