InterviewStack.io LogoInterviewStack.io

Database Internals and Storage Engines Questions

How databases work under the hood: storage-engine architectures (B-tree versus LSM-tree), on-disk page and buffer management, write-ahead logging, and MVCC. Covers the engine-level mechanisms that explain performance, durability, and concurrency behavior. Tests depth beyond usage — why a database behaves as it does.

HardSystem Design
48 practiced

A storage corruption event has affected 2 of 5 nodes in a distributed database cluster that holds user transaction history. Create an operational recovery plan to minimize data loss, verify integrity, and restore service within 4 hours. Include detection, isolation, restore from backups/replicas, consistency checks, and client failover procedures.

MediumTechnical
51 practiced

Your OLAP cluster suffers from the small-files problem: many small Parquet files per partition causing expensive planning and poor IO. Propose a plan to compact files, prevent recurrence, and perform compaction safely with minimal downtime. Include steps for atomic replacement and verification.

HardTechnical
42 practiced

Design and describe a compact on-disk layout for a simple key-value store that supports atomic writes, efficient range scans, and snapshots without pausing writes. Provide pseudocode for write path, manifest updates, and how snapshots are represented and read.

HardTechnical
45 practiced

Operating Cassandra, you observe huge numbers of tombstones leading to CPU spikes and compaction storms. Outline a root-cause analysis, immediate mitigations to stabilize the cluster, long-term schema and TTL/compaction changes, and a recovery plan to restore healthy read/write performance without unacceptable data loss.

MediumTechnical
42 practiced

Given a very large 'events' table:

events(event_id uuid, user_id int, event_time timestamptz, event_type text, payload jsonb)

Write PostgreSQL SQL to compute daily active users (DAU) and a 7-day rolling average of DAU. Then explain an index and partitioning strategy you would use to run this nightly for a table with billions of rows.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.