GATE / CS ARCHIVE

GATE CSE 2026 SET 2 / QUESTION 46

Dense hash indexes and sparse tree indexes

Database Management Systems · Indexing, Storage & Query Processing · Full GATE CSE 2026 Set 2 paper

GATE 2026 Set 2, Q46 2 marks · MCQ
Report issue

Indexing, Storage & Query Processing

Question 46, GATE 2026: An index is dense if it has an entry for every search-key value in its indexed file; otherwise it is sparse. S1: a hash index must be dense. S2: a B+ tree index can be sparse. Options: A both true; B both false; C only S1; D only S2.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Givens and goal

An index is dense if it has an entry for every search-key value in its indexed file; otherwise it is sparse. S1: a hash index must be dense. S2: a B+ tree index can be sparse. Options: A both true; B both false; C only S1; D only S2.

Approach

Ask whether omitted keys can be found from an ordered boundary entry.

Step-by-step solution

1. In the standard hash-index model, searching key k uses h(k) to locate its bucket and then the relevant search-key entry. Hash values do not arrange keys in sorted order, so an entry for a nearby smaller key does not identify where an omitted key belongs.
2. Consequently the search-key index must represent every indexed value: S1 is true under the problem’s dense/sparse definition. A bucket directory is a different structure from the entries for the indexed search-key values.
3. For an ordered data file, a B+ tree can hold just one boundary key per data block. Searching for k finds the appropriate boundary and follows its pointer, then scans that block for k. Most individual keys need not appear in the index.
4. This is a valid sparse B+ tree index, establishing S2. A B+ tree can also be dense, but the statement only says can be sparse.
5. Thus A is correct. Sparseness relies on the supporting ordered-file organization; a sparse boundary index over arbitrary unordered records would not provide this search guarantee.

Original paper, page 32 · Answer key