next up previous
Next: B+ Tree Page-Level Classes Up: Design Overview Previous: Design Overview

A Note on Keys for this Assignment

You should note that key values are passed to functions using KeyClass objects (an abstract class). The contents of a key should be interpreted using the AttrType variable. The key can be either a string(attrString) or an integer(attrInteger), as per the definition of AttrType in global package. We just implement these two kinds of keys in this assignment. If the key is a string, its value is stored in a StringKey class which extends the KeyClass . Likewise, if the key is an integer, its value is stored in a IntegerKey class that also extends the KeyClass .

Although using the above structure, keys can be of (the more general enumerated) type AttrType, you can return an error message if the keys are not of type attrString or attrInteger.

The BTSortedPage class, which augments the insertRecord method of HFPage by storing records on a page in sorted order according to a specified key value, assumes that the key value is included as the initial part of each record, to enable easy comparison of the key value of a new record with the key values of existing records on a page.


next up previous
Next: B+ Tree Page-Level Classes Up: Design Overview Previous: Design Overview
2011-11-15