InterviewStack.io LogoInterviewStack.io

Database Fundamentals and Storage Engines Questions

Core principles and components of data storage and persistence systems. This includes storage engine architectures and how they affect query processing and performance; transactions and isolation including atomicity, consistency, isolation, and durability; concurrency control and isolation levels; indexing strategies and how indexes affect read and write amplification; physical versus logical storage and object, block, and file storage characteristics; caching layers and cache invalidation patterns; replication basics and how replication affects durability and read performance; backup and recovery techniques including snapshots and point in time recovery; trade offs captured by consistency, availability, and partition tolerance reasoning; compression, cost versus performance trade offs, data retention, archival, and compliance concerns. Candidates should be able to reason about durability, persistence guarantees, operational recovery, and storage choices that affect latency, throughput, and cost.

MediumTechnical
0 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
0 practiced
Design a mechanism to support cross-shard transactions with strong consistency and minimal latency for a sharded relational database. Compare using two-phase commit (2PC) coordinator vs distributed consensus per transaction (e.g., Paxos/Raft), list failure modes for each, and discuss how to optimize for latency while avoiding distributed deadlocks and long-tail commits.
HardTechnical
0 practiced
A distributed key-value store using an LSM backend is experiencing heavy write amplification and SSD wear due to compaction storms. Propose a detailed mitigation plan that includes algorithmic changes (compaction tuning, tiering), hardware adjustments (overprovisioning, SSD selection), and operational policies (compaction scheduling, backpressure). Explain how you would evaluate effectiveness and avoid harming read latency.
EasyTechnical
0 practiced
Describe caching strategies: cache-aside, read-through, write-through, and write-back. For each strategy explain how cache invalidation is handled and the typical failure modes that produce stale reads or lost writes. As an SRE, outline a resilient cache invalidation strategy for a distributed Redis layer used by an application that performs concurrent updates to related keys.
MediumTechnical
0 practiced
Design a compaction strategy for an LSM-based store (e.g., RocksDB) that balances write throughput, read latency, and disk usage for a mixed workload. Describe compaction types (minor/major/levelled/size-tiered), scheduling heuristics, throttling under peak load, and the metrics you'd monitor to ensure compaction doesn't destabilize the service.

Unlock Full Question Bank

Get access to hundreds of Database Fundamentals and Storage Engines interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.