Skip to the content.

Page oriented storage

B-Tree

The most widely used indexing structure. Instead of having the log indexing on variable size segments and always write a segment sequentially. B tree uses fixed-size pages, and read or write one page at a time. The database engine primarily builds B tree structures(Disk-Based B-Trees) on disk, the leaf contains the ref(disk address) to the actual data.

In-Memory B-Trees (Performance-Driven Scenarios), Certain database systems, primarily In-Memory Databases (IMDBs), keep the entire B-tree index in memory.

Log indexing

log-indexing

B tree indexing

b-tree-indexing

On read

On write

Crash recovery

The B tree is in memory, if system crashes we need to rebuild the B tree. This could be done from write-ahead-log.

Concurrency

Latches (lightweight locks) is used to protect the page from modified by concurrent thread/processes.

Improvements