← Back to Home

Databases Interview Questions — What Senior Engineers Need to Know

Database questions in senior interviews go well beyond writing SQL queries. Interviewers want to understand how you reason about indexing strategies, transaction isolation levels, and the trade-offs between different storage engines. Can you explain why a B-tree index helps range queries but not arbitrary substring searches?

These 17 questions cover the database concepts that matter most in production systems: ACID guarantees, locking and concurrency control, normalization trade-offs, replication strategies, and query optimization. The kind of knowledge that separates engineers who use databases from engineers who understand them.

All 17 Questions

ACIDWhat does ACID stand for and what does each property guarantee?IndexesHow do database indexes work and when should you use them?Clustered vs Non-clusteredWhat is the difference between clustered and non-clustered indexes?Isolation LevelsWhat are the database isolation levels and what anomalies does each prevent?NormalizationWhat is database normalization and what are the normal forms?PostgreSQL Internals — MVCC, WAL, VACUUMExplain PostgreSQL's MVCC, WAL, and VACUUM.Database ShardingWhat is database sharding and what are its trade-offs?Read ReplicasWhat are read replicas and when would you use them?Covering IndexWhat is a covering index?Master-slave vs Master-masterWhat is the difference between master-slave and master-master replication?Database Replication FailoverHow does database replication failover work?Database Query OptimizationWhat techniques do you use to optimize database queries?SELECT FOR UPDATEWhat does SELECT FOR UPDATE do and when would you use it?SQL Date Range OverlapHow do you check for date range overlaps in SQL?Optimistic Locking — Version ColumnHow does optimistic locking with a version column work?Partial IndexWhat is a partial index and when would you use one?Composite Index + Prefix RuleWhat is a composite index and how does the prefix rule apply?

How to Prepare

Focus on understanding concepts deeply enough to explain them in your own words. For each topic, practice articulating the trade-offs and real-world applications — interviewers care about practical judgment, not textbook definitions.

Related Topics

  • System Design Interview Questions
  • Distributed Systems Interview Questions
  • Infrastructure Interview Questions

Test Your Knowledge

Take a free AI-graded assessment across multiple domains. No signup required.

Start Free Assessment
GrindQuestionsAITechnical interview assessment
TermsPrivacyAbout