6,825 views
1 votes
1 votes
consider a file of 8192 records .each records is 16 bytes long and its key field is pf size 6 bytes.the file is ordered on a key field and the file organization is unspanned .the file is stored in a file system with block size 512 bytes . and the size of the block pointer 10 bytes.if the primary index is built on the key field of the file and a multilevel index scheme i used to store the primary index,the number of first level and second level blocks in the multilevel index are respectively_________

2 Answers

Best answer
4 votes
4 votes
No of records in one block=512/16=32

No of data blocks=8192/32=256

No of entries in one index block=512/16=32

No of first level index blocks=256/32=8

No of second level index block=1( 8 entries would fit in single block)
selected by
1 votes
1 votes

File has 8192 records

Each record size 16 B

Key field 6 B

Block pointer size 10 B

Block size 512 B

No of record in each block 512/16 = 32

No. of blocks 8192/32 =256

For primary indexing 

key and pointer field size 6+10=16B

So, No. of entry in each block 512 B/16 B= 32

So, no of blocks in first level index 256/32 = 8

Second level entry will be 1 (As 32 entries fit in 1 block)

reshown by

Related questions

2 votes
2 votes
1 answer
1
pritika kundu asked Dec 2, 2015
423 views
Given a data file with 100 records per pages and on index page capacity of 512 index entries, how deep should be the B++ tree to index this file.
0 votes
0 votes
1 answer
2
Don't you worry asked Jun 3, 2016
1,464 views
A. what files are in the databaseB. what attribute are possessed by the dataC. what these files containD. All of the above
1 votes
1 votes
1 answer
3
1 votes
1 votes
1 answer
4