##
CSE3330 Homework #5

Due on Wednesday December 8, before midnight

Worth 4% of the final grade

*(50 points)* Solve Problem 18.19 from the textbook.

*(50 points)*
Suppose we have a file of 1,000,000 records, each record has 100
bytes. Suppose disk blocks are 1024 bytes long. Suppose pointers to records and to blocks are 5
bytes long. Determine the number of disk accesses to do a successful
lookup for a record for each of the cases below. Also determine the
amount of disk space you need to store the data and the indexes used
in the cases below. Explain your answers.
- (10 points) The file is stored as a heap file.
- (15 points) The file is stored as a sequential file ordered by a key and binary search is used.
- (25 points) Secondary indexing is used using a B+-tree index. A search key field requires 10 bytes. Consider the worst case.

## How to Submit the Homework

You need to submit your homework solution online using the following web form.
Acceptable document formats are: Microsoft word/powerpoint document, PDF, and postscript.
You may submit it as many times as you like,
but only the most recently submitted file will be retained and evaluated.

Last modified: 11/2/10 by Leonidas Fegaras