Loading…
Database questions cover storage engine trade-offs, replication and lag, transactions and isolation, and choosing a store that matches the access pattern.
Database questions in system design interviews are access-pattern questions. The choice between a relational store, a key-value store, a document store or a search index follows from how the data is read and written, and the answer that earns credit is the one that names the dominant query first and picks the store second.
Replication lag is the detail interviewers use to separate reading from experience: adding read replicas is the obvious scaling move, and being able to describe the read-your-own-writes anomaly it introduces — and the routing rule that fixes it — is the follow-up. Expect questions on the default isolation level of whatever database you named, and on which parts of the design genuinely need a transaction rather than idempotent retries.
17 system design · 2 cloud architecture · 4/4/11 easy/medium/hard
Decide from the access pattern and justify it out loud. Relational stores are the sensible default when transactions and flexible queries matter; a key-value or document store earns its place when the query shape is fixed and the write volume is the constraint.
Only for reads, and at the cost of replication lag. Writes still land on one primary, so replicas postpone rather than remove the need for sharding — which is the follow-up interviewers are usually driving toward.