Ask HN: Embedded Database Design Papers
In order to learn more about database design principles I thought it would be great to read papers on embedded databases. I have searched around for material on the popular open source databases like RocksDB, LMDB, or LevelDB but haven't found anything concrete. Aside from reading the source code, how can I teach myself about the data structures and abstractions that these provide? Eventually I would like to write a toy implementation after getting acquainted with a subset of this knowledge.
4 comments
[ 2.3 ms ] story [ 23.5 ms ] threadLMDB uses a B-tree variant, according to Wikipedia. Maybe it's a B+ tree as Wikipedia says, but keep your thinking cap on -- it's probably not in exactly the form you see described on Wikipedia.
If you want to see a toy LSM-tree implementation, I have one at https://github.com/srh/nihdb -- it was written as a starter Rust project, not as a fast LSM-tree engine. It's almost the simplest plausible LSM-tree. But you'll miss out on design considerations relating to concurrency and performance.
https://symas.com/lmdb/technical/#pubs
every aspect of the source code is documented with Doxygen.
http://www.lmdb.tech/doc/
The Red Book can give you many ideas [2].
Mark Callaghan has been published a lot of stuff related to LSM recently [3].
[1] http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.219...
[2] http://www.redbook.io/
[3] https://smalldatum.blogspot.com/?m=1
Real database systems are more sophisticated, but the most basic B+-Tree is still very interesting.