Integrity controls supported by DBMSs Which of the following integrity controls may be enforced by a DBMS?
-
AAssume a default value for a field unless the user supplies one.
-
BLimit the permissible set of values a field may assume (domain constraint).
-
CRestrict or forbid NULLs in specified fields (NOT NULL).
-
DAll of the above.
-
ENone of the above; integrity is handled only by the application.
Answer
Correct Answer: All of the above.
Explanation
Introduction / Context:Modern relational databases provide rich integrity controls so that correctness does not rely solely on application code. Using built-in constraints shrinks bug surface area and improves data quality by design. This question verifies recognition of common DBMS-enforced controls.
Given Data / Assumptions:
- We operate in a relational DBMS with DDL-defined constraints.
- We can specify defaults, domains/ranges, and NULLability in schema.
- Constraints are validated on insert/update.
Concept / Approach:
Defaults fill in values when none are provided; domain constraints limit values via CHECK or enumerated types; NOT NULL ensures presence. These complement primary/foreign keys and unique constraints, forming a comprehensive integrity layer.
Step-by-Step Solution:
1) Map each option to a standard DDL feature: DEFAULT, CHECK/ENUM, NOT NULL.2) Confirm all are supported in mainstream DBMSs.3) Therefore, choose “All of the above.”Verification / Alternative check:
Documentation for PostgreSQL, Oracle, MySQL, and SQL Server includes DEFAULT, CHECK, and NOT NULL constraints as first-class features.
Why Other Options Are Wrong:
- Option E is false; integrity should be enforced in the database as well as in application logic.
Common Pitfalls:
- Leaving integrity to the app layer only, risking multiple inconsistent writers.
- Overusing triggers where declarative constraints suffice.
Final Answer:
All of the above.