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.
Where have you been looking? LMDB's design is fully documented. Aside from the papers<p><a href="https://symas.com/lmdb/technical/#pubs" rel="nofollow">https://symas.com/lmdb/technical/#pubs</a><p>every aspect of the source code is documented with Doxygen.<p><a href="http://www.lmdb.tech/doc/" rel="nofollow">http://www.lmdb.tech/doc/</a>
RocksDB and LevelDB use a "log-structured merge tree" so you might want to use that as a search term. There is a section "Papers" at the bottom of the web page at <a href="http://leveldb.org/" rel="nofollow">http://leveldb.org/</a> .<p>LMDB 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.<p>If you want to see a <i>toy</i> LSM-tree implementation, I have one at <a href="https://github.com/srh/nihdb" rel="nofollow">https://github.com/srh/nihdb</a> -- 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.
Goetz Graefe [1] published interesting surveys on B-Trees, query optimization...<p>The Red Book can give you many ideas [2].<p>Mark Callaghan has been published a lot of stuff related to LSM recently [3].<p>[1] <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.219.7269&rep=rep1&type=pdf" rel="nofollow">http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.219...</a><p>[2] <a href="http://www.redbook.io/" rel="nofollow">http://www.redbook.io/</a><p>[3] <a href="https://smalldatum.blogspot.com/?m=1" rel="nofollow">https://smalldatum.blogspot.com/?m=1</a>