Database Internals and Storage Engines Questions

How a single database engine works internally, at the mechanism level: storage-engine architectures such as B-tree versus LSM-tree, on-disk page and buffer-pool management, write-ahead logging (WAL) and checkpointing, and MVCC's internal mechanics (version chains, vacuum and bloat, transaction-ID wraparound). Also covers compaction and its write/read amplification trade-offs, including engine-specific behavior such as Bloom filters and tombstone/TTL expiry in LSM-based stores like Cassandra, and hands-on design of simplified storage components: on-disk data layouts and indexes, WAL recovery routines, compaction strategies, and crash-safe log or queue formats. Tests depth beyond usage: why the engine behaves as it does, not how to operate, tune, recover, or scale it.

HardTechnical
41 practiced

Explain MVCC (Multi-Version Concurrency Control) and how it enables non-blocking reads. Describe PostgreSQL's autovacuum process, why table bloat occurs, how to detect it, and mitigations to prevent vacuum-related performance issues. Include operational knobs and metrics you would monitor to prevent transaction ID wraparound.

HardTechnical
51 practiced

You need to support efficient binary search over a large, compressed, immutable sorted array stored on disk, without decompressing the whole thing to look up one element. How would you approach the on-disk layout and compression scheme to keep random-access latency low, and how would you design a block index over it to avoid a full scan?

HardTechnical
40 practiced

Explain how Write-Ahead Logging (WAL) works and how crash recovery uses WAL to achieve durability. Describe the role of checkpoints and how fsync frequency and group commit impact durability, latency, and throughput. Discuss trade-offs when tuning WAL behavior for high-throughput systems.

EasyTechnical
42 practiced

What is a B-tree index and why is it well-suited to range queries? Describe briefly how B-tree insert/delete operations maintain balance, why page splits occur, and how page splits can impact write amplification and concurrency.

HardSystem Design
51 practiced

You are asked to design a simple transactional storage engine prototype that supports ACID guarantees: describe the high-level architecture, core data structures (indexes, append-only log, memtable/sstable or pages), transaction logging (WAL), concurrency control approach (locking vs MVCC), checkpointing and background compaction, and crash recovery algorithm. Focus on the trade-offs for durability, latency, and throughput.

Unlock Full Question Bank

Get access to all 22 Database Internals and Storage Engines interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.