Difficulty: Easy
Correct Answer: Correct
Explanation:
Introduction / Context:
Enhanced ER modeling uses specialization (subtypes) to avoid excessive nulls and to encapsulate attributes that only make sense for particular categories of an entity. This question evaluates whether you recognize the classic trigger for introducing subtypes.
Given Data / Assumptions:
Concept / Approach:
If attributes apply to only some instances (for example, a Vehicle that is sometimes a Truck with payload_capacity), creating subtypes prevents storing irrelevant attributes (nulls) on the supertype and supports rules unique to each category. The model can mark the specialization as disjoint or overlapping and total or partial, based on business rules. Implementation options include a discriminator column, separate subtype tables keyed by the supertype’s primary key, or a single-table structure with constraints.
Step-by-Step Solution:
Verification / Alternative check:
Check sample data for many nulls in certain columns; this typically indicates that subtype partitioning would yield a cleaner schema with better integrity and simpler queries.
Why Other Options Are Wrong:
Common Pitfalls:
Creating subtypes for convenience without a clear rule difference; or failing to enforce subtype membership via constraints and application logic, which allows inconsistent data.
Final Answer:
Correct
Discussion & Comments