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.

EasyTechnical
43 practiced
Explain the ACID properties (atomicity, consistency, isolation, durability) and the CAP theorem (consistency, availability, partition tolerance). For an SRE, map ACID guarantees to operational practices such as WAL configuration, fsync behavior, replication mode, and backups. Provide concrete examples where you would intentionally favor availability over consistency and vice versa, and explain the operational trade-offs and risks involved.
HardTechnical
45 practiced
Discuss the trade-offs between synchronous and asynchronous replication in terms of the CAP theorem, write latency, and failure modes. For a partition-tolerant distributed system, how would you design replication to provide strong consistency where needed while keeping most reads low-latency? Provide concrete quorum-based architectures and the operational implications.
HardTechnical
41 practiced
Production Postgres write latencies spike and fsync appears to be the bottleneck. Explain the possible root causes (fsync frequency, small writes, group commit misconfiguration, disk controllers, write barriers, virtualization), and propose a prioritized set of mitigations ranging from DB configuration changes (synchronous_commit, wal_buffers), OS tuning (I/O scheduler, noatime), to hardware fixes (NVMe, battery-backed write cache). Include how you'd measure the impact of each change safely.
MediumSystem Design
45 practiced
Outline an automated leader failover system for a replicated SQL cluster. Requirements: detect primary failure fast, elect or promote a replica safely, ensure fencing to avoid split-brain, and automate DNS / load balancer updates. Describe safety checks, preconditions for promotion, and how to handle network partitions and rejoining of the old primary.
HardSystem Design
37 practiced
Design a multi-region replication strategy for a global application that requires RTO < 60 seconds and RPO <= 5 seconds for critical data but has strict cost constraints. Describe replication topology (e.g., primary-region writes, follower reads, geo-primary, quorum), network and storage considerations, data partitioning strategy, and how to limit cross-region latency impact while meeting RPO/RTO targets.

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.