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

Database The Relational Model and Normalization Difficulty: Easy
Choose an option
  • A
    composite keys.
  • B
    determinants.
  • C
    candidate keys.
  • D
    foreign keys.
  • E
    nonkey attributes.

Answer

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.

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