Primary key vs. candidate key — evaluate the claim:\n“A primary key is a composite key that was selected to be the main identifier for the relation.” Indicate whether this is correct or incorrect.

Difficulty: Easy

Correct Answer: Incorrect — a primary key is a chosen candidate key and may be single-attribute

Explanation:


Introduction / Context:
Keys are central to relational integrity. The primary key is the designated unique identifier, selected from the set of candidate keys. This question tests whether the primary key must necessarily be “composite.”



Given Data / Assumptions:

  • Candidate keys are minimal superkeys; there can be multiple candidate keys.
  • The primary key is one selected candidate key to act as the main identifier.
  • Candidate keys can be single-attribute or multi-attribute (composite).


Concept / Approach:
The definition of primary key does not require compositeness. A primary key can be a single attribute (e.g., roll_no) or a composite (e.g., order_id + line_no). What distinguishes a primary key from other candidate keys is the choice for identification and referential referencing, not the number of attributes.



Step-by-Step Solution:

Identify claim: “primary key is a composite key.”Compare with definition: primary key = chosen candidate key (may be single or composite).Therefore, the statement is incorrect.Implication: primary keys are about selection, not composition.


Verification / Alternative check:
Typical tables have single-attribute primary keys (e.g., id SERIAL/IDENTITY). Composite primary keys exist but are not mandatory.



Why Other Options Are Wrong:

  • “Correct — must be composite” contradicts widespread practice and definition.
  • BCNF status and foreign keys are irrelevant to whether a primary key is composite.
  • Primary keys are not necessarily surrogate; they can be natural keys.


Common Pitfalls:
Equating “primary” with “composite”; assuming surrogate keys are required.



Final Answer:
Incorrect — a primary key is a chosen candidate key and may be single-attribute

More Questions from The Relational Model and Normalization

Discussion & Comments

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