CS FundamentalsModerateIBM · Deloitte pattern

Which statement about dense and sparse indexes is correct?

  1. A. A primary index must always be dense
  2. B. A dense index has an entry for only one record per block
  3. C. A sparse index can be used only if the data file is sorted on the search key
  4. D. A secondary index on a non-ordering field can be sparse

Correct answer: C. A sparse index can be used only if the data file is sorted on the search key

A sparse index stores one entry per block and relies on the file being ordered on that key to find records in between. A secondary index must be dense because the file is not ordered on that field; a primary index is usually sparse.

More DBMS and SQL questions

Exams that ask this topic