Hacker News new | ask | show | jobs
by gtrubetskoy 2188 days ago
The details of how the data is stored are described in this 1979 paper by Douglas Comer: "The Ubiquitous B-Tree" [1]. Since it was invented, much hasn't really changed: practically all relational databases use some variation of this structure. I wrote about it in [2], which might help explain some aspects of how it works.

[1] https://dl.acm.org/doi/10.1145/356770.356776

[2] https://grisha.org/blog/2013/05/11/relational-database-on-to...

Edit: also [3] is about how to store SQLite in a Redis hash (rather than on-disk file).

[3] https://grisha.org/blog/2013/05/29/sqlite-db-stored-in-a-red...

1 comments

A lot of modern databases don't use Btrees anymore. With a LSM structure you can use other suitable data structures because they can be write-only. For example leveldb uses a simple binary search.
They didn't say 'all', they said 'many'. So your one example doesn't 'beg to differ' much in the way of OP's point.