During this semester we will be implementing several parts of an database management system. The system will basically have five components, and we will implement the middle three components. The five components of the system are:
Each of these systems will make use of the earlier layers. We will have test routines for each layer and a final query system that will use the resulting entire system. Below I will give a short description of each layer.
This layer will be provided to you. This layer will provide the basic routines for requesting, reading and writing pages that will make up files. We will be providing this layer to you largely because the code in this layer is very system specific and because we will be using a very simplified approach to maintaining files (our "files" will actually be parts of one large database file).
This layer will provide mechanisms to allow layers to request pages, deallocate pages, and pin (and unpin) pages in the Buffer layer. This provides an intermediate level between the file managing layers and the actual system layer that lets you abstract away details of page allocation (and when to read/write pages).
In the first part of assignment 4 you will provide mechanisms for creating database files as B+ tree files. This layer will provide routines for creating and destroying a B+ tree file, adding records, deleting records, updating records, and opening a scan on a B+ file.
In the second part of assignment 4 you will implement a database catalog consisting of a relation relation (containing information about what relations exist in our system), an attribute relation (containing information about the attributes of that relation), and an index relation (containing information about hash indexes). You will include routines for setting up the initial catalog, adding and dropping relations from the system, adding and deleting tuples from a relation, showing the tuples of the relation.
In this layer we will add routines for creating iterators/scans for select, project and join queries (based on the information in the catalog).
The query language parser provided will allow us to issue queries in a simple query language that will then be executed by our query processor layer. This code will be provided. In a more complete system, a parser would be needed for the language we are using (likely a variant of SQL), we would then add a planner layer and an optimizer layer that would optimize the iterators/scans produced by our query parser.
You will also find a few other files in the system not directly part of any of the layers shown above. These are: