7,969 views
1 1 vote
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 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 1 vote

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
Position:
Show:

Related questions

2 2 votes
1 1 answer
756
756 views
pritika kundu asked Dec 2, 2015
756 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 0 votes
1 answers 1 answer
2.1k
2.1k views
Don't you worry asked Jun 3, 2016
2,073 views
A. what files are in the databaseB. what attribute are possessed by the dataC. what these files containD. All of the above
1 1 vote
1 answers 1 answer
2.9k
2.9k views
Don't you worry asked Jun 3, 2016
2,937 views
A. File structureB. RecordsC. FieldsD. Database
1 1 vote
1 answers 1 answer
9.5k
9.5k views
Purple asked Jan 25, 2016
9,546 views
Which is the best file organization when data is frequently added or deleted from a file?(A) Sequential (B) Direct(C) Index...