In a relational database model, NULL values can be used for all but which one…
2016
In a relational database model, NULL values can be used for all but which one of the following?
Answer: A. To allow duplicate tuples in the table by filling the primary key column(s) with NULL. — ConceptIn the relational model, NULL is a marker for missing, unknown, or inapplicable information; it is not an ordinary value such as zero or the empty…
- A.
To allow duplicate tuples in the table by filling the primary key column(s) with NULL.
- B.
To avoid confusion with actual legitimate data values like 0 (zero) for integer columns and '' (the empty string) for string columns.
- C.
To leave columns in a tuple marked as “unknown” when the actual value is unknown.
- D.
To fill a column in a tuple when that column does not really “exist” for that particular tuple.
Attempted by 1191 students.
Show answer & explanation
Correct answer: A
Concept
In the relational model, NULL is a marker for missing, unknown, or inapplicable information; it is not an ordinary value such as zero or the empty string.
Entity integrity requires every component of a primary key to be non-NULL. Separately, the primary-key constraint requires the complete key value—one column or a column combination—to identify each tuple uniquely.
Application
Filling a primary-key component with NULL violates entity integrity because part of the identifier is absent. Using such markers to permit duplicate tuples also defeats the uniqueness required of the complete primary-key value.
Contrast
Using NULL instead of 0 or the empty string keeps missing information distinct from legitimate domain values.
Using NULL for an unknown attribute value represents information that has not yet been established.
Using NULL for an inapplicable attribute represents that no value exists for that tuple in that context.
Cross-check
If a primary-key column admitted NULL, a tuple could lack a complete identifier, violating entity integrity; separately, allowing duplicate primary-key values would violate key uniqueness. The other three cases do not use NULL as an identifier.
Therefore, the exception is: To allow duplicate tuples in the table by filling the primary key column(s) with NULL.