Difficulty: Easy
Correct Answer: All of the above.
Explanation:
Introduction / Context:
Poor data-type choices propagate pain: wasted space, slow scans, and integrity problems. Picking the right type is foundational for performance and correctness across OLTP and analytics systems. This item tests whether you know the balanced objectives in type selection.
Given Data / Assumptions:
Concept / Approach:
Good schema design aims to minimize storage (without losing fidelity), correctly represent the domain (e.g., DATE for dates, NUMERIC for money), and enforce integrity (NOT NULL, CHECK, ENUM/domain constraints). These goals are not mutually exclusive; they reinforce one another when the correct type is used with constraints.
Step-by-Step Solution:
Verification / Alternative check:
Vendor guides and normalization practice emphasize domain-correct types with constraints to improve query plans and reduce anomalies, while right-sizing preserves I/O and cache efficiency.
Why Other Options Are Wrong:
Common Pitfalls:
Final Answer:
All of the above.
Discussion & Comments