Conclusion: Should Nulls be considered harmful?


Should the use of Nulls be considered a harmful practice? The answer is a definite No. Nulls and 3 Valued Logic provide a robust solution to the problem of missing information. Missing information is a complex problem to solve. See Missing Information Exists!. It is not surprising that it leads to more complex solutions.

One complication of missing information is that it produces unknown answers to queries. 3 Valued Logic provides powerful and expressive capabilities for dealing with unknown answers for evaluating unknown results. This is How Relational solves the Missing Information Problem.

Recently, Nulls and 3 Valued Logic have been the subject of a controversy - The Controversy over Nulls. C. J. Date and others have advised against the use of Nulls and have called 3 Valued Logic flawed and counter intuitive. They have proposed Default Value Schemes as a substitute method of dealing with missing information.

These Schemes for Default Values introduce new problems and real flaws and do not adequately deal with the problem of missing information. The default value schemes are little more than a thin veneer placed over Nulls. They restrict logic processing to 2 Valued Logic, thereby severely limiting language power and expressiveness in dealing with missing information and unknown answers.

The Real Controversy

The 3 Valued Logic defined in the relational model is not inherently flawed and provides an elegant solution to the problem of missing information and unknown answers. The robust implementation of 3VL in FirstSQL proves this. On the other hand, the 3VL processing in most RDBMSs is flawed and erroneous. Even the ANSI SQL specification defines 3VL processing incorrectly.

The 3VL errors in ANSI SQL and most RDBMSs can produce wrong or contradictory answers, causing the unforseeable consequences: medical treatments could be incorrect, bridges could collapse, spacecraft could fall out of the sky, and so on, listed by C. J. Date in his article 'Beware of SQL EXISTS!', References (1). While Date points out a significant flaw in the implementation of SQL EXISTS in most systems (FirstSQL is the only RDBMS that has demonstrated a correct EXISTS processing), he doesn't go far enough. He actually minimizes the problem. The issue paper, '..., bridges could collapse, spacecraft could fall out of the sky, and so on', Do DBMSs Process Subqueries Correctly?, describes the larger problem.

The real controversy is that documented errors are found in the EXISTS processing and other subqueries for most RDBMSs. The vendors are ignoring this flaw, and Date is overshadowing it with his attack on Nulls. Date is concentrating on subjective arguments about counter intuitiveness that can never be resolved scientifically, while real flaws exist in current products.

Return to Contents Page: Should Nulls be considered harmful?     Return to Issues Page


Copyright © 1998 FFE Software, Inc. All Rights Reserved WorldWide