An experiment to create a database system from scratch, using minimum third party dependencies.
The following SQL constructs are loosely supported:
- Create table
- Insert rows
- Update rows
- Delete rows
- Drop tables
The following data types are supported for columns:
- String
- Unsigned int
- boolean
The current execution model starts up by scanning the current working directory for our preferred table file extension (".mbx") and registering each file as a table. The tables contain metadata for the schema that each tuple follows and the data itself is divided into pages.
Each SQL statement is parsed and sent to a command executor which applies the action via a page cache. The page cache is an LRU cache which keeps pages in memory to minimize disk reads.
There are two kinds of pages, a metadata page stores meta information about the table, such as the schema, and multiple data pages store actual tuples.
The following dependencies are used:
- linenoise for the repl
- googletest for unit testing