How to handle missing information in relational databases is controversial. Independent of the semantic difficulties SQL presents when dealing with nulls, missing information also makes exploratory data analysis far more difficult than the identical data mining operation performed on data free of missing values.
The problems resulting from recording and manipulating missing information are concerned principally with ambiguous, counterintuitive meaning of nulls as reported by database queries.
This section examines the semantic ambiguities with nulls to make designers aware of their potential problems of interpretation. The principal thrust is to make you aware of the inconsistencies in the way SQL handles missing information. Careful use of nulls can provide benefits that cannot otherwise be achieved, but their careless use can present serious problems for the integrity of your databases and the accuracy of the information you retrieve.
The recommendation is to avoid using nulls. Whenever possible, constrain columns to be NOT NULL.
For information about the primary cluster and compute clusters, see Managing Compute Resources.
- Semantics of SQL Nulls
- Inconsistencies in How SQL Treats Nulls
- Bivalent and Higher-Valued Logics
- Alternatives to Nulls for Representing Missing Information
- Systematic Use of Default Values
- Redesigning the Database to Eliminate the Need for Nulls
- Manipulating Nulls with SQL
- Logical and Arithmetic Operations on Nulls
- NULL Literals
- Hashing on Nulls
- Null Sorts as the Lowest Value in a Collation
- Searching for Nulls Using a SELECT Request
- Searching for Nulls and Nonnulls in the Same Search Condition
- Excluding Nulls from Query Results
- Nulls and the Outer Join