GATE CS 2026 Set 2 — Question 46
Go beyond PYQs with Success TrackerAI-powered personalised practice and doubt support. Unlimited practice on eligible plans; AI usage limits apply.MCQ+2 / -0.67MediumDense vs Sparse IndexesIndexing & File OrganizationDatabasesStatic & Dynamic HashingB+ Tree Operations
Databases → Indexing & File Organization → B+ Tree Operations
Last updated
Question
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 tree index can be a sparse indexWhich one of the following options is correct?
S2: A tree index can be a sparse indexWhich one of the following options is correct?
Correct answer
(A) Both S1 and S2 are true
Solution
Statement S1 is true. A hash index organizes search keys into buckets based on a hash function. To locate a record with a specific search key , the system computes to find the bucket. If the index were sparse (i.e., not containing every search key), there would be no way to locate a record whose key is not in the index, because hashing does not preserve order (unlike tree indices where you can search for the nearest key). Therefore, a hash index must be dense.Statement S2 is true. A tree index can be sparse, specifically when it is a clustering index (primary index) on a file that is sorted by the search key. In this case, the index only needs to store an entry for the first record of each block (or a representative key), rather than for every single record.Thus, both statements are true.
Continue learning with Success Tracker
A step still unclear? Work through it with support
Use Success Tracker to ask about the reasoning, then try another GATE CS question to check your understanding.
AI-powered practice· Unlimited practice on eligible plans
- PYQs with solutions
- Attempt available previous-year questions, then compare your reasoning with the worked solution. Coverage varies by stream.
- Practice that adapts
- Choose a topic, work on weaker areas and bookmark questions to revisit. Your attempts feed your progress tracking.
- AI doubt support
- Ask follow-up questions about a step or concept while practising, instead of stopping at the final answer.
Unlimited practice is available on eligible plans. Free practice and AI usage have limits; check the current plan allowances before choosing.
This page stays readable without an account. AI responses can be wrong; check them against the solution and source material.
More questions on Indexing & File Organization
2026 Set 2 Q15In the context of DBMS, consider the two sets T and S given below. | T | S | |---|---| | I:…2026 Set 2 Q20Consider concurrent execution of two transactions and in a DBMS, both of which access a…2026 Set 1 Q30Let and be the attributes of a relation in a relational schema. Let…2026 Set 1 Q31In the context of relational database normalization, which of the following statements is/are true?2026 Set 2 Q42In the context of schema normalization in relational DBMS, consider a set F of functional…