Difficulty: Easy
Correct Answer: A domain constraint
Explanation:
Introduction / Context:
Constraints enforce data quality by restricting what can be stored. Among them, domain constraints govern the permissible set of values at the attribute level.
Given Data / Assumptions:
Concept / Approach:
A domain constraint defines the set of valid values for an attribute. It can be implemented with a CHECK constraint, an enumerated type, or a reference table with a foreign key. The key idea is that only listed or allowable values can exist in that column.
Step-by-Step Solution:
Verification / Alternative check:
DBMS documentation often shows domain checks as CHECK (status IN (...)) or by referencing a domain table.
Why Other Options Are Wrong:
Range constraint: Restricts by numeric/temporal range, not a discrete set.
Intrarelation/Interrelation constraints: Describe constraints within or between tables generally; they do not specifically denote value-domain restrictions.
Common Pitfalls:
Hard-coding value lists across application tiers instead of centralizing in the database; forgetting to validate during updates as well as inserts.
Final Answer:
A domain constraint
Discussion & Comments