Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Implementation of boolean types.

Re: Implementation of boolean types.

From: -CELKO- <jcelko212_at_earthlink.net>
Date: 14 Jul 2005 07:17:39 -0700
Message-ID: <1121350659.397618.4400@g49g2000cwa.googlegroups.com>


NULL is not a logical value and UNKNOWN is. Look up the truth tables in any SQL book.

Q: Now what is the first and most important rule of NULLs? A: NULLs propagate in computations!

That means we should have these rules for Boolean types:

 NULL AND TRUE = NULL
 NULL AND FALSE = NULL
 NULL AND NULL = NULL  NULL OR TRUE = NULL
 NULL OR FALSE = NULL
 NULL OR NULL = NULL  NOT NULL= NULL -- valid but really weird looking, unh?

However, in 3VL we have these rules

 UNKNOWN AND TRUE = UNKNOWN
 UNKNOWN AND FALSE = FALSE <== opps! not the same as NULL  UNKNOWN AND UNKNOWN = UNKNOWN  UNKNOWN OR TRUE = TRUE <== opps! not the same as NULL  UNKNOWN OR FALSE = UNKNOWN
 UNKNOWN OR UNKNOWN = UNKNOWN  NOT UNKNOWN = UNKNOWN So, which of the three values does a NULL map to? The results of logical expressions now depend on the order of execution and substitution of UNNOWN and NULL Received on Thu Jul 14 2005 - 09:17:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US