indexing

An ISAM (indexed sequential) file consists of records of size 64 bytes each, including key field of size 14 bytes. An address of a disk block takes 2 bytes. If the disk block size is 512 bytes and there are 16 K records, compute the size of the data and index areas in terms of number blocks. How many levels of tree do you have for the index?

2Comments
Akshay Saxena @akshay0612
27 Oct 2017 03:49 pm
2k blocks for data 67 blocks for index and 3 level 64/2/1.
shivani @shivani1234
27 Oct 2017 04:25 pm
record size = 64 B
index size = 14+2= 16B
blocking factor for record file = 512/64 = 8
blocking factor for index file = 512/16= 32
So, for no. of levels , we have 16K/8= 2K
(ceil)2K/32= 64
(ceil)64/32 =2
(ceil)2/32 =1
So , total 3 levels are required/