Homework 3
CS422, Summer 2009

Due: Wednesday, August 12

Create a zip file of your SimpleDB project using the launch file zip.launch and upload the zip file to CSNS. Note that file uploading will be disabled automatically after 11:59PM of the due date, so please turn in your work on time.


[Preparation]

Set up SimpleDB project under Eclipse as described in the lecture notes.

[Exercises]

1. (40pt) The class Page has methods to get/set only integers and strings. Modify the class to handle doubles, booleans, byte arrays, and dates. Use PageTest.java to test your code.

2. (40pt) Create a new buffer manager that implements the LRU buffer replacement policy. Use BufferManagerTest.java to test your code.

Note that you may not make any changes to the test code, but you can change the SimpleDB source code in any way necessary.

[Extra Credit (up to 10pt)]

In Ex.2, use an efficient data structure to keep track of the available buffers so that locating the least recently used buffer does not require scanning the whole buffer pool.