Are the terms “alternate key” and “candidate key” truly synonymous, or is an alternate key specifically a candidate key that was not chosen as the primary key?

Difficulty: Easy

Correct Answer: Incorrect

Explanation:


Introduction / Context:
Key terminology matters in database design. “Candidate key” refers to any minimal set of attributes that can uniquely identify a row. Among the candidate keys, one is selected as the primary key. The remaining candidate keys are called “alternate keys.”



Given Data / Assumptions:

  • There may be multiple candidate keys for a table.
  • Exactly one candidate key is chosen as the primary key.
  • Other candidate keys may be enforced via UNIQUE constraints.


Concept / Approach:
Alternate keys are a subset of candidate keys: specifically, those not selected as the primary key. Thus, “candidate key” and “alternate key” are not identical terms. The statement that they “mean the same thing” is therefore incorrect, although alternate keys are still candidate keys by nature.



Step-by-Step Solution:

Identify all minimal unique attribute sets — these are candidate keys.Choose one to be the primary key.Label the rest as alternate keys and enforce with UNIQUE constraints.Hence, alternate key ≠ candidate key (strict equality), but alternate ⊂ candidate.


Verification / Alternative check:
Define a table with both email and username unique for users. Either could be PK (candidate keys). If username is chosen as PK, email is an alternate key (still unique).



Why Other Options Are Wrong:

  • “Correct” ignores the primary-versus-alternate distinction.
  • “Synonymous in all textbooks” is factually wrong.
  • “Weaker than candidate keys” misrepresents; they are candidate keys not chosen as PK.
  • “Only in NoSQL” is irrelevant; this is relational terminology.


Common Pitfalls:
Assuming there is only one candidate key; forgetting to enforce uniqueness on alternates; confusing superkeys with candidate keys (minimality requirement).



Final Answer:
Incorrect

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion