RecordPage
There are 3 new functions in the RecordPage class.
Unfortunately, YES. You will have to manipulate the slot directory entries while sorting (implementation of class SortedPage).
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.
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)
(key, pageId) pairs.
(key, dataRid) pairs, where dataRid is the record-id of the data record of the B+ Tree.
Back to the cs564 home page