Difficulty: Easy
Correct Answer: Correct
Explanation:
Introduction / Context:
The primary key uniquely identifies each row of a table. To perform that role, the key must be present for every row and must be unique. This question checks whether you know that primary key attributes cannot be optional or NULL in a properly defined table.
Given Data / Assumptions:
Concept / Approach:
Because the primary key is the row’s identity, it must always be present. Therefore, DBMSs disallow NULL in any primary key column and require that the combined values be unique. “Required” in modeling terms means the attribute cannot be missing; in SQL this is captured via NOT NULL and the PRIMARY KEY constraint. If you need an optional descriptive attribute, do not put it in the primary key; use a surrogate key for identity and alternate keys for business uniqueness as needed.
Step-by-Step Solution:
Verification / Alternative check:
Review vendor docs (PostgreSQL, MySQL, SQL Server, Oracle): all enforce NOT NULL and uniqueness for PRIMARY KEY columns.
Why Other Options Are Wrong:
Common Pitfalls:
Using a nullable natural key as the primary key; letting business keys change and break foreign keys; omitting a surrogate when natural keys are volatile.
Final Answer:
Correct
Discussion & Comments