Controversy over Nulls

C. J. Date is respected the world over as a Relational Database writer. After initially supporting the use of nulls in relational systems, he reversed his position in the late '80s and began advising against their use. This ignited a controversy that still rages today. See References (2), (3), (6) and (7).

Date's main objection is not to Nulls themselves but to 3 Valued Logic. 3 Valued Logic or 3VL is described in How Relational solves the Missing Information Problem. Date argues that 3 Valued Logic causes difficulties of understanding to the level of being counter intuitive.

Unfortunately, examinations of intuitiveness cannot be made in any scientific manner, bringing the discussion down to matters of taste and opinion. On the other hand, Date has intimated that 3 Valued Logic was flawed and could produce incorrect answers. While he has correctly pointed out flaws of 3VL implementation in ANSI SQL and many extant RDBMSs, he has not demonstrated any flaws in the only known correct 3VL implementation - The FirstSQL RDBMS. See Do DBMSs Process Subqueries Correctly? for a discussion of the flaws in ANSI SQL and many RDBMSs.

Date and others have proposed several Schemes for Default Values as a replacement for Nulls and 3VL. These proposals are not sufficiently defined for a meaningful implementation and introduce true flaws into database processing. They constitute a weak substitute for Nulls with greatly reduced power and expressiveness.

3VL is Intuitive

In recent communications (also, References (6)) Date states that a proper 3VL implementation (FirstSQL is an example of one), does not have logic flaws but continues to maintain that 3VL does not 'reflect the real world'. He is reduced to perhaps his weakest argument, because 3 Valued Logic fits very well with the real world.

For a real world example - a person might inquire of you - 'Is it raining?', expecting a yes or no answer. Depending on your situation (you might be inside a building, away from windows), you could respond with the equivalent of - 'I don't know", much like the unknown response in 3VL. 3 Valued Logic basically asserts that any response that is not definitely known to be true or false is unknown. These are real world concepts.

3 Valued Results

By focusing so much on 3 Valued Logic, Date has obscured the major aspect of null processing - results from database operations are also 3 Valued. Much of the comprehension problems he finds in 3 Valued operations can be clarified with this simple understanding. When information is missing, the results from database operations are partitioned into 3 groups: In the real world, this is similar to the following partitioning of objects into groups, for example: These concepts are not counter intuitive. They can be easily grasped by the average person. 3 Valued Results in Relational Database details how 3 Valued Results are supported or not supported in RDBMSs.

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

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