The Flow goes like this
Cursor->table->pager->file
Each node is a page
And each cell(key-value pair) is a row accept for internal node which point to another node
- [Phase 1: REPL Interface]
- [Phase 2: SQL Compiler and Virtual Machine]
- [Phase 3: Single Table Database]
- [Phase 4: Persistent Database]
- [Phase 5: Cursor Abstraction]
- [Phase 6: B-tree Implementation]
- [Phase 7: Binary Search]
- [Phase 8: Node Splitting]
- [Phase 9: Recursively Searching the B-Tree]
- [Phase 10:Scanning a Multi-Level B-Tree Sequentially]
- [Phase 11: Updating Parent Node After a Split]
- [Phase 12: Splitting Internal Nodes]
- [Notes]
To build and run the project, follow these steps:
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Compile the code:
gcc -o db database.c
-
Run the database:
./db <database-file>
You can interact with the database using SQL commands. Here are some examples:
-
To insert a new row:
insert 1 "username" "[email protected]";
-
To select rows:
select;
-
To exit the REPL:
.exit