HACKER Q&A
📣 debo_

Building a relational database system for educational purposes?


If I wanted to build a compiler for fun, I can think of several good, practical books that I could follow along with to do so.

Can any of you recommend something similar for relational databases? I'm interested in writing some potentially restricted subset of SQL, with some query planning + optimization. If it ended up being a toy version of sqlite, I would be quite satisfied.

Thank you!


  👤 new_guy Accepted Answer ✓

👤 miguendes
The best book I've ever found so far is this one: https://www.springer.com/gp/book/9783030338350

The author builds a small relational database from scratch in java. It supports only a few types and not all SQL commands but it's great to get a big picture.