/* * CS 4420: Database System Implementation * Class Project - Skeleton Code for Implementation of Indexing using B+ Trees * AUTHOR: Tushar Sugandhi * Last Updated:02/12/2007 * * * NOTE: This code is for the purpose of giving you an idea * about signature of public functions. * * You may use the public functions in this class for implementing * indexing in your database system. Currently, I am giving you this * "skeleton code" so as to give an insight of the functionality that * will be provided. It will be helpful for you while designing your system. * * Also note that each object of BTree class is capable of handleing ATMOST * 20 indices. (That is, it can handle indexing on 20 attributes.) * * WARNING: This is NOT a fully functional code. This is just a skeleton code. * The purpose of this code is to make your designing job easier. * You can also use these functions as a place holder in your code * to make sure your code compiles. * A fully functional code will be provided to you soon. * * */ public class BTree { //open or create index file, find free entry in index information table, //fill in entry, dupKeys is true if duplicate keys are allowed, false if not, //return number of entry in table public int OpenIndex (final String name,final boolean dupKeys) { return 0; } //insert key & ptr in index file //'index' is the entry in index information table where information about index file is stored //return 0 for success, nonzero for error public int Insert(final int index,long key,long ptr) { return 0; } //return pointer for corresponding key in index file where key <= inputKey, //return -1 if none public long Lookup(final int index,final long key) { return 0; } // close Index file, free entry in index information table public void CloseIndex(final int index) { return; } }