Show the steps involved in searching for search-key value of 11 for each case above.
Show the steps involved in searching for search-key values between 7
and
17 for each case above.
Ques.2: Suppose we have a file of 10,000 records, each
record
has 100 bytes. Suppose disk blocks are 512 bytes long. Suppose block
addresses
are 4 bytes long (i.e., to specify address to a block requires 4 bytes)
and also pointers to records are 4 bytes long (i.e., a pointer which
specifies
address of the record in the block needs 5 bytes).
How many disk I/O operations are needed to sort the above file using
(a) 2 input buffers and 1 output buffer and (b) 10 input buffers and 1
output buffer. You must derive the equations in terms of general file
size of n records and file of size M disk blocks.
Ques.3: For the file described in question 2, determine the number of disk accesses to do a successul lookup for a record for each of the cases below. Also determine, where possible, the amount of disk space you need to store the index structures or hash structure, or any other structure used in the cases below. Explain your answers.