This is a mini database project, developed with C++. It supports basic SQL instructions such as create table
, create index
, drop
, delete
, select
.
The architecture is shown in the following figure. The system consists of different components: API, Interpreter, Record Manager, Index Manager, Catalog Manager, Buffer Manager and DB Files. We use binary files to store data.
We use Visual Studio 2015 to build the system.
Provide the interface of performing SQL instructions.
- An input to Interpreter => build an inner data structure
- Receive information from Catalog Manager => decide how to perform
- Call Record Manager, Index Manager, Catalog Manager => perform
- Return results to Interpreter
- Control the flow
Start -> accept, process, show instructions -> quit
- Check semantic and grammar
Manage all model information; store information in XML files.
- Definition of table
- Definition of attribute
- Definition of index
Manage data files.
- create/delete data files
- insert/delete records
- query records
Implement B+ Tree Indexes.
Manage the buffer area.
- Read/Write data blocks
- Implement a replacement algorithm.
Store catalog, record and index.