Difficulty: Easy
Correct Answer: An attribute that uniquely identifies each row
Explanation:
Introduction / Context:
The primary key (PK) is the cornerstone of relational design. It guarantees that each tuple (row) is unique and provides a stable target for foreign key references from other tables, enabling consistent joins and integrity.
Given Data / Assumptions:
Concept / Approach:
A primary key is a minimal set of attributes whose combined values uniquely identify each row. The database enforces uniqueness and non-nullability, providing a reliable mechanism to locate and associate records across the schema.
Step-by-Step Solution:
Verification / Alternative check:
Check that count(rows) equals count(DISTINCT PK) and that no PK value is NULL. This confirms correctness of the chosen PK.
Why Other Options Are Wrong:
Any attribute: not necessarily unique.
Uniquely identifies each column: columns are identified by names, not runtime values.
Derived attribute: derivation does not imply uniqueness or suitability as PK.
Common Pitfalls:
Choosing volatile attributes (like email) as PKs; better to use stable natural keys or surrogate keys.
Final Answer:
An attribute that uniquely identifies each row
Discussion & Comments