3 ms·
Ask HN: How can I learn how to write my own DB system?
- giardini 8y agoAsk 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 8y agoJust for learning purposes. I don't actually want to build one to use it in production or something.
- RNeff 8y agoThere 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 8y agoI'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!
- InGodsName 8y agoIt 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.
- SamReidHughes 8y agoYou’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 8y agopreviously on hackernews: https://learndb.net/ https://learndb.net/