Ask HN: How can I learn how to write my own DB system? - diehunde
======
RNeff
There are a number of textbooks on Database Implementation.I used one from
1999. You should probably read "Seven Databases in Seven Weeks" to learn about
the different kinds of DBs. Basically, a DB is just some very large data
structures with optimized access algorithms.

There are a number of open source DBs, reading the code will be a real
challenge. You have to know what each module is implementing and the subtle
features. You have to be a serious language expert in whatever programming
language they used.

~~~
diehunde
I've never read that book. The title always makes me think it only covers
superficial content on databases. I'll give it a try. Thanks!

------
giardini
Ask yourself why you want to it?

There so many excellent systems available that are most likely better than
whatever you write and which are available for use right now.

~~~
diehunde
Just for learning purposes. I don't actually want to build one to use it in
production or something.

------
SamReidHughes
You’ve got on-disk data structure, resource management, getting writes safely
committed, programming language implementation, and transaction management.
You can start with a subset of these.

------
billconan
previously on hackernews: [https://learndb.net/](https://learndb.net/)

------
InGodsName
It will take a long time to build something robust.

Build something like Clickhouse, it's source is on GitHub.

It's work in progress, so it's not very huge yet.

See if you can recreate it in Rust.

Lemme know if you want me to contribute to your project :).

Happy to code some parts.

