Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: How can I learn how to write my own DB system?
8 points by diehunde on Dec 15, 2018 | hide | past | favorite | 7 comments



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.


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!


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.


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


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.


previously on hackernews: https://learndb.net/


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.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: