CS 564 - Assignment 3 FAQ


Note:
  1. Do NOT add any private data members to any of SortedPage, BTIndexPage or BTLeafPage.
  2. The makefile is only a skeleton which you have to modify to suit your particular implementation. (You have to setup the dependencies in the Makefile).
  3. The error messages can be registered in the function main, in the driver.

Questions about...

RecordPage

SortedPage

BTIndexPage

BTLeafPage


RecordPage

  1. What is the difference between HFPage and RecordPage?

    There are 3 new functions in the RecordPage class.

  2. Do I have to know the internal structure of a RecordPage?

    Unfortunately, YES. You will have to manipulate the slot directory entries while sorting (implementation of class SortedPage).

  3. Can i get some information about RecordPage? Here is a pointer to record_page.C and record_page.h

SortedPage

  1. Is compaction of slot directories done automatically?

    NO. Holes in the slot directory are not filled. There is a function in RecordPage (compact_slot_dir()) which you have to call for compaction.

  2. How do I combine a key and a PageId ?
        func(void * key, PageId pageNo)
        {
           char * recPtr = new char [sizeof(int) + sizeof(PageId)];
    
           memcpy(recPtr, (char *) key, sizeof(int));
           memcpy(recPtr+sizeof(int), (char *) &pageNo, sizeof(PageId));
           .
           .
           .
        }
    
    (Note, this version will work for integer keys only)

BTIndexPage

  1. What is stored on a BTIndexPage?

    (key, pageId) pairs.


BTLeafPage

  1. What is stored on a BTLeafPage?

    (key, dataRid) pairs, where dataRid is the record-id of the data record of the B+ Tree.


Back to the cs564 home page