Professional Documents
Culture Documents
To search for a record using the index, we need an additional block access to the data file for
a total of 9 + 1 = 10 block accesses
We calculated the index blocking factor bfri = 68 index entries per block, which is also the
fan-out fo for the multilevel index;
Number of first level blocks b1 = 442 blocks was also calculated.
Number of second-level blocks will be b2 = 𝖥(b1/fo)⎤ = 𝖥(442/68)⎤ = 7 blocks,
Number of third-level blocks will be b3 = 𝖥(b2/fo)⎤ = 𝖥(7/68)⎤ = 1 block.
Hence, the third level is the top level of the index, and t = 3.
To access a record by searching the multilevel index, we must access one block at each level
plus one block from the data file, so we need t + 1 = 3 + 1 = 4 block accesses.
Compare this to Example 2, where 10 block accesses were needed when a single-level index
and binary search were used.
Solve
1. Construct a B+ tree of order p=4 with the following key elements 10, 12, 16, 18, 22,
26, 63, 92, 110. Assume that the tree is initially empty and values are added in
ascending order.
2. Delete the key 200 from the B+tree given below.
3. Suppose that we are using extendable hashing on a file that contains records with the
following search-key values: 2, 3, 5, 7, 11, 17, 19, 23, 29, 31 Show the extendable hash
structure for this file if the hash function is h(x) = x mod 8 and buckets can hold three
records.