UNIVERSITY OF WASHINGTON

CSE 594: DATABASE MANAGEMENT SYSTEMS

AUTUMN 1999

Homework 3: Data Storage and Indices

See the web page for homework guidelines, due dates, and policies.


  1. Exercise 7.6 from textbook. Assume the average rotational delay is 5 msec (milliseconds) and the transfer rate is 2560 bytes/msec.

  2. Consider a query on two relations R and S, where R occupies 2 disk blocks and S occupies 5 disk blocks. The query requests the blocks in the following order: R1, S1,..., S5, R2, S1, ..., S5. (This behavior might appear in a nested loops join, for example.) Assume the buffer pool has 4 frames and when the query begins, no pages of the database are in the buffer pool. Also assume that the initially empty buffer frames are filled from left to right (frame 1 to frame 4). When answering the questions below, if a page replacement strategy results in a "tie" (e.g., two different frames might contain a most-recently-used page), choose to replace the page that will give the best overall performance for the query. For each of the four replacement strategies below, (i) list, in order, the pages that will be read in from the disk and (ii) list, in order, the pages that are in the buffer pool when the query ends (e.g., R1, R2, S5, S4 might occupy the frames 1-4). Remember that only unpinned frames are candidates for replacment and that using the page in a frame is not the same as reading that page in from disk.

    1. LRU
    2. MRU
    3. FIFO (first-in, first-out)
    4. Clock

  3. Exercise 8.2 from textbook. Answer the questions for all three file organizations (heap, hash, sorted).

  4. Exercise 9.8 from textbook, parts 1, 2, and 4 only. Ignore the phrase "using the bulk-loading algorithm,".

  5. Portions of Exercise 9.2 from textbook and additional questions:

    1. Exercise 9.2, Part 1.

    2. Exercise 9.2, Part 4. Draw the changed portions of the resulting tree.

    3. Exercise 9.2, Part 5.

    4. Assuming subtrees A, B, and C are completely full, what is the minimum number of records you would have to delete to decrease the tree's height by 1 level?