Difficulty: Easy
Correct Answer: Correct
Explanation:
Introduction / Context:
Indexes speed up data retrieval by creating auxiliary structures that map key values to table rows. Most relational database management systems (RDBMS) support indexes on primary keys as well as on secondary (non-primary, non-unique) columns. This question checks your understanding of what columns may be indexed.
Given Data / Assumptions:
Concept / Approach:
Primary keys get index support automatically (unique B-tree, hash, or other structures depending on the engine). Secondary keys—such as foreign keys, frequently searched attributes, or sort/group columns—can also have indexes created to reduce scan costs. While details like clustered vs. nonclustered, bitmap vs. B-tree, and partial indexes vary by vendor, the general principle that both primary and secondary keys may be indexed is universally true.
Step-by-Step Solution:
Verification / Alternative check:
Query plans typically show index seeks/scans on both primary and secondary indexes when predicates match indexed columns.
Why Other Options Are Wrong:
Common Pitfalls:
Over-indexing, redundant indexes, or ignoring write overhead; failing to include leading columns that match query predicates; misunderstanding composite index ordering.
Final Answer:
Correct
Discussion & Comments