Learning path
Database Internals learning path: everything to study, topic by topic
Deep assessment of database storage engine internals based on Alex Petrov's Database Internals: page layout and file formats, B-Tree and B+Tree structures, LSM-trees and immutable storage, buffer management and recovery, transaction processing and concurrency control, and core distributed storage primitives.
Short answer
To learn Database Internals, work through 6 modules and 26 topics in the order they build on each other. It starts with Storage Foundations, then moves on to B-Tree Family and LSM & Immutable Storage. Use the map as a checklist, or measure your level and study only what is missing.
What you will study
Topics are grouped by module. Open one to see its objectives and key concepts.
1 · Storage Foundations4 topics
Storage Engine Architecture
The role of a storage engine within a DBMS, the separation of storage from query processing, and the fundamental distinction between in-place update (B-Tree) and append-only (LSM) engines
Objectives
- Explain what a storage engine does and how it fits in a DBMS
- Contrast in-place update engines with append-only engines
Key concepts
- storage engine
- in-place update vs append-only
- row vs column orientation
- memory vs disk-based
- read-optimized vs write-optimized
Page Layout & Disk Blocks
How records are organized into fixed-size pages aligned to disk blocks, page headers, fixed vs variable-length records, and why the page is the fundamental unit of I/O
Objectives
- Describe how records are packed into pages and aligned to blocks
- Explain why the page is the unit of I/O for disk-based engines
Key concepts
- page
- disk block alignment
- page header
- fixed vs variable-length records
- unit of I/O
Slotted Pages
The slotted page organization that stores a slot directory of offsets at the page start and variable-length cells growing from the end, enabling in-place deletes, updates, and compaction
Objectives
- Explain how a slotted page supports variable-length records
- Describe how deletes and updates create and reclaim free space in a page
Key concepts
- slot directory
- cell offsets
- variable-length cells
- in-page fragmentation
- page compaction
On-Disk File Formats
How database files encode cells, keys, values, and pointers; binary encoding, byte order, magic numbers, versioning, and checksums that make a format readable and durable
Objectives
- Describe the components of an on-disk database file format
- Explain how checksums and versioning protect file integrity
Key concepts
- binary encoding
- cell format
- checksums
- magic numbers
- format versioning
2 · B-Tree Family5 topics
B-Tree Fundamentals
The balanced, high-fanout search tree at the heart of most databases: occupancy invariants, logarithmic height, why high fanout minimizes disk seeks, and key search within a node
Objectives
- Explain why B-Trees use high fanout to reduce disk I/O
- Describe the balance and occupancy invariants of a B-Tree
Key concepts
- balanced tree
- high fanout
- branching factor
- logarithmic height
- occupancy invariant
B+Tree Structure
The B+Tree variant that stores values only in leaves and links leaves into a sequential chain, optimizing range scans and separating routing keys in internal nodes from data in leaf nodes
Objectives
- Contrast a B+Tree with a classic B-Tree
- Explain how leaf chaining accelerates range scans
Key concepts
- values in leaves only
- sibling leaf pointers
- separator keys
- range scan optimization
- internal vs leaf nodes
Node Splits, Merges & Rebalancing
How B-Trees stay balanced on insert and delete: splitting full nodes and propagating the separator up, merging or rebalancing underfull nodes, and the cost of structural modifications
Objectives
- Walk through a node split and the promotion of a separator key
- Explain when merges and rebalancing occur on deletes
Key concepts
- node split
- separator promotion
- node merge
- rebalancing
- right-only appends
B-Tree Variants & Optimizations
Practical B-Tree optimizations: copy-on-write B-Trees, lazy B-Trees and deferred writes, Bw-Trees with delta chains, sibling pointers (B-link trees), and fractional cascading ideas
Objectives
- Compare copy-on-write and in-place B-Tree update strategies
- Explain how Bw-Trees and B-link trees reduce write or locking overhead
Key concepts
- copy-on-write B-Tree
- lazy B-Tree
- Bw-Tree delta chains
- B-link tree sibling pointers
- deferred writes
Clustered & Secondary Indexes
How indexes map keys to data: clustered (primary) indexes that store rows in key order vs non-clustered secondary indexes that store references, and the cost of maintaining multiple indexes
Objectives
- Distinguish clustered from non-clustered secondary indexes
- Reason about the write cost of maintaining multiple secondary indexes
Key concepts
- clustered index
- non-clustered secondary index
- index-organized table
- covering index
- index maintenance cost
3 · LSM & Immutable Storage6 topics
LSM-Tree Architecture
The log-structured merge-tree: buffering writes in memory, flushing immutable sorted runs to disk, and merging them in the background to trade read cost for write throughput
Objectives
- Explain the LSM-tree write and read paths
- Contrast LSM-trees with B-Trees on write throughput and read cost
Key concepts
- log-structured merge-tree
- immutable sorted runs
- in-memory buffer
- background merge
- write-optimized structure
Memtables
The in-memory sorted structure (often a skip list or balanced tree) that absorbs writes before they are flushed to an SSTable, the active/flushing memtable lifecycle, and its WAL pairing
Objectives
- Describe the memtable lifecycle from active to flushed
- Explain why a memtable is paired with a write-ahead log
Key concepts
- in-memory sorted structure
- skip list
- active vs flushing memtable
- flush threshold
- memtable WAL pairing
SSTables
Sorted String Tables: immutable on-disk files of sorted key-value pairs with a data block section, sparse index, and footer, enabling efficient lookups and merges across runs
Objectives
- Describe the on-disk layout of an SSTable
- Explain how tombstones represent deletes in an immutable file
Key concepts
- sorted string table
- immutability
- sparse index block
- data blocks
- tombstones
Compaction Strategies
Background merging of SSTables to reclaim space and bound read cost: size-tiered vs leveled compaction, their write/space amplification trade-offs, and tombstone garbage collection
Objectives
- Compare size-tiered and leveled compaction strategies
- Explain how compaction reclaims space deleted via tombstones
Key concepts
- size-tiered compaction
- leveled compaction
- tombstone garbage collection
- merge of sorted runs
- compaction trigger
Bloom Filters
Probabilistic membership filters used to skip SSTables that cannot contain a key: how multiple hash functions set bits, the meaning of false positives, and sizing for a target false-positive rate
Objectives
- Explain how a bloom filter avoids unnecessary SSTable reads
- Reason about the trade-off between bloom filter size and false-positive rate
Key concepts
- probabilistic membership
- hash functions
- false positive rate
- no false negatives
- bit array sizing
Read, Write & Space Amplification
The three amplification factors that govern storage-engine trade-offs and the RUM conjecture: how B-Trees and LSM variants sit at different points on the read/write/space surface
Objectives
- Define read, write, and space amplification with examples
- Place B-Tree and LSM engines on the amplification trade-off surface
Key concepts
- read amplification
- write amplification
- space amplification
- RUM conjecture
- engine trade-off surface
4 · Buffer Management & Recovery4 topics
Buffer Pool Management
The in-memory cache of pages that mediates all disk access: page tables, pinning and reference counts, dirty page tracking, and the latching that keeps concurrent access safe
Objectives
- Describe how a buffer pool caches and tracks pages
- Explain why pages are pinned and how dirty pages are flushed
Key concepts
- buffer pool
- page table
- pinning and pin count
- dirty pages
- latching
Page Eviction Policies
Choosing which page to evict when the buffer pool is full: LRU and its scan-resistance problems, CLOCK/second-chance, LRU-K and LFU variants, and interactions with prefetching
Objectives
- Compare LRU, CLOCK, and LRU-K eviction policies
- Explain how a sequential scan can pollute an LRU buffer pool
Key concepts
- LRU
- CLOCK / second-chance
- LRU-K
- scan resistance
- prefetching
Write-Ahead Logging
The durability mechanism that records changes to a sequential log before applying them to pages: the WAL invariant, log records and LSNs, force/steal policies, and group commit
Objectives
- State the write-ahead logging invariant and why it guarantees durability
- Explain how steal/no-force policies interact with the log
Key concepts
- write-ahead log
- log sequence number (LSN)
- WAL invariant
- steal and force policies
- group commit
ARIES Recovery
The ARIES crash-recovery algorithm and its three phases — analysis, redo, and undo — with repeating history, compensation log records, checkpoints, and the dirty page table
Objectives
- Walk through the three phases of ARIES recovery after a crash
- Explain how compensation log records make undo idempotent
Key concepts
- analysis, redo, undo phases
- repeating history
- compensation log records
- checkpoints
- dirty page table
5 · Transactions & Concurrency4 topics
Transaction Processing & ACID
What a transaction guarantees and how a storage engine implements ACID: atomicity via logging, consistency, isolation via concurrency control, and durability via WAL and fsync
Objectives
- Map each ACID property to its implementation mechanism
- Explain how a transaction manager coordinates commit and abort
Key concepts
- ACID properties
- atomicity via undo/redo
- durability via fsync
- transaction manager
- commit and abort
Isolation Levels & Anomalies
The SQL isolation levels and the read/write anomalies they permit: dirty reads, non-repeatable reads, phantoms, write skew, and the gap between serializability and snapshot isolation
Objectives
- Map isolation levels to the anomalies they prevent
- Explain why snapshot isolation still permits write skew
Key concepts
- read committed
- repeatable read
- serializable
- snapshot isolation
- write skew and phantoms
Locking & Two-Phase Locking
Pessimistic concurrency control with locks: shared/exclusive lock modes, two-phase locking and strict 2PL for serializability, lock granularity, deadlock detection, and lock escalation
Objectives
- Explain how strict two-phase locking yields serializable schedules
- Describe how deadlocks are detected and resolved
Key concepts
- shared vs exclusive locks
- two-phase locking
- strict 2PL
- deadlock detection
- lock granularity and escalation
Multi-Version Concurrency Control
MVCC: keeping multiple versions of each row so readers never block writers, version visibility via transaction timestamps/snapshots, garbage collection of old versions, and optimistic validation
Objectives
- Explain how MVCC lets readers proceed without blocking writers
- Describe version visibility and garbage collection in an MVCC engine
Key concepts
- multiple row versions
- snapshot visibility
- readers don't block writers
- version garbage collection
- optimistic concurrency control
6 · Distributed Storage3 topics
Failure Detection
Detecting node failures in a distributed store: heartbeats and timeouts, the impossibility of perfectly distinguishing slow from dead, phi-accrual detectors, and gossip-based dissemination
Objectives
- Explain why perfect failure detection is impossible in async networks
- Describe how phi-accrual and gossip improve failure detection
Key concepts
- heartbeats and timeouts
- phi-accrual failure detector
- gossip dissemination
- false suspicion
- completeness vs accuracy
Replication & Anti-Entropy
Keeping copies of data consistent: leader-based vs leaderless replication, synchronous vs asynchronous propagation, read/write quorums, and anti-entropy via Merkle trees and read repair
Objectives
- Compare leader-based and leaderless replication models
- Explain how quorums and anti-entropy keep replicas consistent
Key concepts
- leader-based vs leaderless replication
- synchronous vs asynchronous
- read/write quorums
- anti-entropy
- Merkle trees and read repair
Consensus Fundamentals
Agreeing on a single value or log order across nodes despite failures: the safety/liveness goals of consensus, the core ideas of Paxos, and how Raft structures leader election and log replication
Objectives
- Explain the safety and liveness goals of distributed consensus
- Describe how Raft separates leader election from log replication
Key concepts
- consensus safety and liveness
- Paxos basics
- Raft leader election
- log replication
- quorum majorities
Levels: Junior, Mid, Senior, and Expert
Explain it in your own words
Graded by AI · no account · 1 questionNo options to guess from: you write, the AI grades against the topic's rubric and tells you what level your answer reads at.
Already studying Database Internals?
The assessment measures topic by topic, and your plan skips what you already know.
Open to read. An account is only needed to be measured.
Frequently asked questions
Where should I start studying Database Internals?
Start with Storage Foundations: Storage Engine Architecture, Page Layout & Disk Blocks, and Slotted Pages. The map orders topics by what they depend on, so each one prepares the next.
How long does a full Database Internals assessment take?
A full assessment of this path takes about 55 minutes. Study time depends on where you start; a diagnostic shows which topics you can skip.
Do I need an account to use this page?
No. The map, objectives and key concepts are open. You only need an account to be measured, get your gap by topic and receive a plan.