3 ms·
is there a book/documents about DB internals ? I have found some books about theory but not about an actual implementation.
by kbradero 10y ago
is there a book/documents about DB internals ? I have found some books about theory but not about an actual implementation.
- pgaddict 10y agoBecause there are many different implementations, with different trade-offs and design decisions. Also, the implementation-specific documentation is typically kept fairly close to the code, as the docs need to be kept in sync. So for example if you need to know how indexes in PostgreSQL work, look into the READMEs in the proper directory: b-tree indexes: https://github.com/postgres/postgres/blob/master/src/backend/access/nbtree/README https://github.com/postgres/postgres/blob/master/src/backend... gin: https://github.com/postgres/postgres/blob/master/src/backend/access/gin/README https://github.com/postgres/postgres/blob/master/src/backend... brin: https://github.com/postgres/postgres/blob/master/src/backend/access/brin/README https://github.com/postgres/postgres/blob/master/src/backend... etc. The READMEs also include links to related papers etc.
- kbradero 10y agohey thanks!, tho I agree with this, I was thinking, if there are books about kernel internals there may be some about db internals. but Thanks for your links !
- dguaraglia 10y agoIf what you are looking is a general book (not necessarily just for Postgres) I can't recommend the "Use The Index, Luke"[1] tutorial, and the accompanying book "SQL Performance Explained" by Markus Winand, enough. It doesn't go into a lot of relational theory, but it does provide a somewhat low-level description on how indices and database data are stored, and why you want to use different kind of indices in different scenarios. [1] http://use-the-index-luke.com http://use-the-index-luke.com
- hyperpape 10y agoIt's useful (probably more useful for most of us than any kind of deep dive into internals, at least for a first read), but I don't remember it going that deep into implementation decisions.
- neilc 10y agoThis is a good summary paper on the database internals and major architectural decisions: http://db.cs.berkeley.edu/papers/fntdb07-architecture.pdf http://db.cs.berkeley.edu/papers/fntdb07-architecture.pdf