Live data from Hacker News

Ash HN: What are some good resources on building a relational database?

news.ycombinator.com

11–16 of 16 posts

Re: Ash HN: What are some good resources on building a relational database?

#11
I was going to suggest the SQLite source code.

One could probably go quite a ways in bare python with lists of dataclasses and pickles, never mind the performance.

That's your backend.

Then you might find some prior art in the way of a SQL parser for a front end.

Re: Ash HN: What are some good resources on building a relational database?

#12
I'd have a look at DuckDB as well, looks like they're doing a great job with their useful, practical and successful innovation and a ton of interesting differentiating design decisions; I hear that's on top of SQLite, is that right? They must have a fair amount of code of their own regardless.

Then there's also some projects who have tried to port or re-create SQLite in Rust.

Re: Ash HN: What are some good resources on building a relational database?

#14
You may check https://cstack.github.io/db_tutorial which teaches writing an SQLite compatible database from scratch in C.

I know you mentioned about RDBMS, but may I introduce you to a structured path for building a KV Store, which can be a foundation for a RDBMS? My project is in TDD fashion with the tests. So, you start with simple functions, pass the tests, and the difficulty level goes up. When all the tests pass, you will have written a persistent key-value store.

https://github.com/avinassh/py-caskdb

Re: Ash HN: What are some good resources on building a relational database?

#15

You may check https://cstack.github.io/db_tutorial which teaches writing an SQLite compatible database from scratch in C. I know you mentioned about RDBMS, but may I introduce you to a structured path for building a KV Store, which can be a foundation for a RDBMS? My project is in TDD fashion with the tests. So, you start with simple functions, pass the tests, and the difficulty level goes up. When all the tests pass…

This is amazing, kudos on all the great work on this project! This definitely seems like an interesting place to look for ideas and learn!
Post reply on HN