Keys and identifiers: what is a compound key, with respect to how items are uniquely identified in a table?

Difficulty: Easy

Correct Answer: both (a) and (b)

Explanation:


Introduction / Context:
Primary keys ensure that each row in a table is uniquely identifiable. Sometimes no single column can serve as a unique identifier, so designers combine more than one column to achieve uniqueness. This concept is foundational for normalization and referential integrity.


Given Data / Assumptions:

  • We are defining “compound key” (also called composite key).
  • Goal: uniqueness of a row by combining multiple attributes.
  • Examples include (country_code, phone_number) or (order_id, line_number).


Concept / Approach:
A compound key is formed by two or more fields whose combined values are unique, even if the individual fields are not unique by themselves. It therefore is “made up of several pieces of information” and “uniquely identifies an item,” satisfying both descriptions in the options.


Step-by-Step Solution:

Recognize that compound/composite = multiple columns.Recall the purpose: enforce uniqueness of each row.Select “both (a) and (b).”


Verification / Alternative check:
In SQL, PRIMARY KEY (col1, col2) defines a composite primary key; uniqueness is guaranteed across the combined tuple values.


Why Other Options Are Wrong:

(a) only: incomplete; must also ensure uniqueness.(b) only: true of any key, not specifically compound without “multiple columns.”“combination of each unique key”: vague and potentially incorrect; compound keys combine columns that individually may not be unique.None: incorrect because both (a) and (b) together are correct.


Common Pitfalls:
Confusing composite keys with concatenated string identifiers; or thinking each participating column must be unique individually (they need not be).


Final Answer:
both (a) and (b)

More Questions from Database Systems

Discussion & Comments

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