edited by
656 views
0 votes
0 votes

In this Question :- 

Let there is a Table named Stud_records  with 3000 records of fixed length , each record size is 50 Bytes and records are stored in a block of size 512 Bytes , If secondary index is built on the key field of size 10 Bytes and a block pointer of size 5 Bytes , then the number of first level index blocks are ______

My Solution :- (According to https://gateoverflow.in/259/gate2008-70 )

Total Records = 3000

Hence The number of blocks in secondary Index = (3000 * 15)/512 = 88 Blocks

The number of blocks in First level index = (88 * 15)/512 = 3   ????  

Why am i wrong ?? Please Help?

edited by

1 Answer

Best answer
2 votes
2 votes

In the first level, there will be an entry for each record of the file.
Total Records = 3000
Size of each record = 50 B
Block size = 512 B
Index record size = 10+5 = 15 B
Records per block$\left \lfloor \frac{512}{15} \right \rfloor$ = 34
The number of blocks in First level index = $\left \lceil \frac{3000}{34} \right \rceil$ = 89

selected by

Related questions

0 votes
0 votes
1 answer
1
samarpita asked Nov 14, 2021
263 views
Hash indexing and Hash file organization are there in gate syllabus???I also wanted to know what are the topics are there in file organization and indexes….as I don’t...
2 votes
2 votes
2 answers
2
aditi19 asked Nov 23, 2018
1,641 views
what is the minimum and maximum number of keys for non-leaf nodes and leaf nodes for B+ Tree of order p?
2 votes
2 votes
2 answers
4
Arnabi asked Oct 25, 2017
660 views