Why must a secondary index, built on a key that is not the file’s sort order, be a dense index?
Correct answer C. Because the records are not sorted on that key, so every key value needs its own index entry
A sparse index stores entries for only some keys and relies on records being in the same order, so you find the nearest smaller key and scan forward. With a secondary index the file is ordered by a different key, so matching records can be anywhere; skipping entries would make records unreachable. A dense index has an entry for every search-key value, and secondary keys need not be unique.
Answer checked How we write and check questions
Discussion