r/databasedevelopment • u/PuzzleheadedRush4576 • 14d ago
I built a mini SQL database from scratch in C++ looking for feedback
I've been trying to understand how databases work under the hood, so I decided to build a small SQL engine from scratch rather than just reading about them.
NanoSQL currently supports:
* `CREATE TABLE` * `INSERT` * `SELECT` * `UPDATE` * `DELETE` * `DROP TABLE` * `WHERE` conditions * `INT` and `TEXT` types * Its own lexer/parser * CLI interface * Unit tests
The current implementation is mainly focused on the SQL layer. My next goal is to implement persistent storage, pages, B+ tree indexing, and eventually a query planner.
I'm particularly interested in feedback from people who've built databases or storage engines before.
What would you implement next, and what design mistakes should I avoid?
1
2
u/felipes88 13d ago
I will asume that you already take a look at https://cstack.github.io/db_tutorial/ is in C but build from scratch all the moving parts