Primary key selection: From which set is the primary key of a relation chosen in relational database design?

Difficulty: Easy

Correct Answer: candidate keys.

Explanation:


Introduction / Context:
Every relation should have a declared primary key. Understanding where it comes from ensures proper entity integrity and sound normalization.



Given Data / Assumptions:

  • Multiple candidate keys may exist for a relation.
  • Primary key is the designated identifier in the schema.
  • Foreign keys create relationships to other relations.


Concept / Approach:
A candidate key is a minimal superkey—no proper subset uniquely identifies rows. The primary key is selected from the set of candidate keys to serve as the official identifier.



Step-by-Step Solution:

Identify all candidate keys (minimal unique sets).Choose one candidate key as the primary key.Other candidate keys remain alternate keys.


Verification / Alternative check:
Database design references consistently define the primary key as a chosen candidate key.



Why Other Options Are Wrong:
Composite keys: Some candidate keys are composite, but not all composites are candidate keys.
Determinants: Not necessarily minimal or unique.
Foreign keys: Reference other relations and need not be unique in the referencing table.



Common Pitfalls:
Assuming any unique set is a candidate key even if not minimal; minimality is required.



Final Answer:
candidate keys.

More Questions from The Relational Model and Normalization

Discussion & Comments

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