Difficulty: Easy
Correct Answer: Incorrect
Explanation:
Introduction / Context:
Primary keys should be compact and stable. Address components are neither: they are verbose, prone to change (street renames, ZIP updates, unit additions), and are hard to standardize across locales. This question evaluates whether a composite address makes an ideal primary key.
Given Data / Assumptions:
Concept / Approach:
An ideal PK is short, stable, and unique. Address fields are lengthy, error-prone (abbreviations, punctuation, international variability), and may change over time. Using them as a composite PK inflates indexes and slows joins. The recommended approach is a surrogate key (e.g., address_id) with uniqueness and validation enforced on normalized address attributes via separate constraints and cleansing processes.
Step-by-Step Solution:
Verification / Alternative check:
Compare index size and join performance using a composite address PK versus a surrogate integer PK; observe the overhead of the composite approach.
Why Other Options Are Wrong:
Common Pitfalls:
Using meaningful but unstable attributes as keys; failing to cleanse and standardize addresses; ignoring apartment/unit numbers leading to false duplicates.
Final Answer:
Incorrect
Discussion & Comments