Computer Sciences > GATE 2026 SET-2 > Database Management System
An index in a DBMS is said to be dense if an index entry appears for every search-key value in the indexed file. Otherwise it is called a sparse index. Consider the following two statements.
S1: A hash index must be a dense index
S2: A B+ tree index can be a sparse index
Which one of the following options is correct?
A
Both S1 and S2 are true
B
Both S1 and S2 are false
C
S1 is true and S2 is false
D
S1 is false and S2 is true

Correct : a

The correct answer is Option A - Both S1 and S2 are true.
An index is called dense if it contains an entry for every search-key value in the file. If some search-key values do not have corresponding entries, the index is called sparse.
S1: A hash index must be a dense index
In hash indexing, a hash function is used to map each search-key value directly to a bucket. For efficient equality search, the system needs to locate records using the exact key, so entries are maintained for every search-key value. Collisions are handled within buckets, but the index still points to all values. Hence, hash indexes are dense. So, S1 is true.
S2: A B+ tree index can be a sparse index
B+ tree indexes allow flexibility in how entries are stored. At the leaf level, it is possible to store entries for every record (making it dense). However, in cases like primary or clustered indexing, the leaf nodes may store entries only for the first record of each block, along with block pointers. This makes the index sparse. Hence, a B+ tree can be implemented as a sparse index. So, S2 is true.
Therefore, both S1 and S2 are true.

Similar Questions

In a database system, unique time stamps are assigned to each transaction using Lamport’s logical clock. Let TS(T1) and TS(T2) be the time stamps of transaction...
#176 MCQ
In the context of DBMS, consider the two sets T and S given below. Which one of the following is the correct match from T to S?
#1560 MCQ
Consider concurrent execution of two transactions T1 and T2 in a DBMS, both of which access a data object A. For these two transactions to not conflict on A, wh...
#1565 MCQ

Related Topics

GATE 2026 GATE CS 2026 Set 2 GATE CS 2026 Q46 dense index vs sparse index hash index GATE B+ tree index GATE DBMS indexing GATE dense index definition sparse index B+ tree GATE DBMS question index types in DBMS

Unique Visitor Count

Total Unique Visitors

Loading......