GATE 2021 CS (CS2) – Question 31
A sorted data file has 150000 student records and 4096-byte blocks. Disk record pointers are 7 bytes; candidate-key Anum is 12 bytes. A dense index stores Anum and its record pointer in each index record, on the same disk. Records cannot straddle blocks. Find the number of index blocks.
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: 698 to 698
Explanation
Each dense index record uses 12+7=19 bytes. A block holds floor(4096/19)=215 complete index records. One entry is needed per student, so the block count is ceil(150000/215)=698. The sort order on another key does not make the candidate-key index sparse.
More File Organization and Indexing (B and B+ Trees) questions
- GATE 2026 CS (CS2) Q46
- GATE 2025 CS (CS1) Q21
- GATE 2025 CS (CS2) Q57
- GATE 2024 CS (CS1) Q21
- GATE 2024 CS (CS2) Q26
- GATE 2023 CS Q62
All File Organization and Indexing (B and B+ Trees) questions →