Copy all the files from cse321/proj2 to your own local proj2 directory and study them carefully. The files that you need to modify are:
To simplify this project, I have provided you with the HFPage code, which implements variable-length record storage within a page. You should use this class both for your directory pages as well as your data pages. The major methods of HeapFile.java that you will implement include the following:
Internally, each heap file should consist of (at least) the following:
The key for creating, opening, and deleting its disk manager entry.
Temporary files are automatically deleted when finalized (destructed).
Identifies the first page of the file, from which all others are reached.
Remember that before you can access any page, you must first pin it using the buffer manager. For all public methods you implement in the HeapFile class, you should leave everything unpinned before you return. Note that inserting and deleting records is somewhat complicated, as you must update both the data and directory pages of the given record. Your implementation should use efficient methods for counting file records and searching for free space.
Again, the java documentation for packpage bufmgr, diskmgr and
heap are online.