Computer Science 4611 : DBMS
Assignments 3-6 Overview

Introduction

During this semester we will be implementing several parts of an database management system. The system will basically have six components, and we will implement the middle four components. The six components of the system are:

  1. Disk Space Manager
  2. Buffer Page Manager (Assignment 3)
  3. Heap Files and Hash Indexes (Assignment 4)
  4. System Catalog (Assignment 5)
  5. Query Processor (Assignment 6)
  6. Query Language Parser

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.

Disk Space Manager

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).

Buffer Page Manager

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).

Heap Files and Hash Indexes

In this assignment you will provide mechanisms for creating database files as heap files, and also for creating an extendible hash index on top of of a database file. This layer will provide routines for creating and destroying a heap file, adding records, deleting records, updating records, and opening a scan on a heap file. A hash index will be set up on any file where a primary key is indicated. You will need to update the index file as part of updating the heap file.

System Catalog

In this part of the assignment 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.

Query Processor

In this layer we will add routines for creating iterators/scans for select, project and join queries (based on the information in the catalog).

Query Language Parser

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.

Other Files

You will also find a few other files in the system not directly part of any of the layers shown above. These are: