This project is a database management system, which takes commands from the command line. This project aims to replicate a full-fledged database management system. I have created this project to implement my learnings from the course CS245: Database Management Systems and CS246: Database Management Systems.
First off, I started by creating a REPL for the command line interface.
Then, I worked on the internal architecture of storing the data. The architecture was first based on rows, which formed into pages arranged
in an array, then defined a primitive cache architecture for the same. Later, the data structure used for storing pages was changed to a
B+ tree. Next, I worked on saving the tree in a file, so that the database is saved after exiting the command line. Lastly, I worked on
introducing two functionalities to the database, namely select and insert.
- Stores all the data in the form of
rows, which in turn is stored in the form ofpageswhich in turn is stored in the form of aB+ tree - Insertion of an entry
- Selection of all the entries in the database
- One can download the project by executing:
git clone https://github.com/g-s01/db-in-c - Then compile the file using:
gcc cli.c -o cli - Then execute the file using:
./cli name-of-db - Example of insertion:

- Example of selection:

- To exit, execute:
.exit
This project was made by Gautam Sharma