Suppose now we have a relation R (x ,y ,z), the place the pair of attributes x and y
collectively kind the important thing. Attribute x ranges from 1 to 100, and y ranges from 1 to
1000. For every x there are data with 100 completely different values of y, and for every y there
are data with 10 completely different values of x. Observe that there are thus 10,000 data in
R. We want to use a multiple-key index that may assist us to reply queries of the shape:
WHERE x = C AND y = D;
the place C and D are constants. Assume that blocks can maintain ten key-pointer pairs,
and we want to create dense indexes at every stage, maybe with sparse higher-level
indexes above them, so that every index begins from a single block. Additionally assume that
initially all index and information blocks are on disk.
a) What number of disk I/O ’s are essential to reply a question of the above kind if the
first index is on x?
b) What number of disk I/O ’s are essential to reply a question of the above kind if the
first index is on y?
c) Suppose you had been allowed to buffer 11 blocks in reminiscence always. Which
blocks would you select, and would you make x or y the primary index, in the event you wished to
reduce the variety of further disk I/O ’s wanted?