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
50 practiced

Implement a disk-backed, time-partitioned index for streaming events that supports append(event) and range_query(start_ts, end_ts), staying under a fixed memory budget. Use segment files for compact on-disk storage optimized for append speed, and include a periodic compaction step that merges segments. Explain your on-disk serialization strategy and how a range query locates the relevant segments without scanning the whole store.

MediumTechnical
44 practiced

Discuss Bloom filters: what they solve, how false positive rate is calculated, how to choose the bit-array size (m) and number of hash functions (k) given expected element count (n) and desired false-positive probability (p), and examples of how databases use them.

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.

HardTechnical
51 practiced

Compare storage engines like InnoDB, RocksDB, and WiredTiger. How does each handle write amplification, compaction, concurrency, and crash recovery, and what kinds of workloads does each excel at? Now suppose you need low-latency point updates AND fast analytic aggregation on the same data: how would your recommendation change, and would a distributed transactional key-value store (e.g., TiKV) change the calculus?

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.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.