Interview Q&A · questions with model answers
Databases & Transactions Interview Questions
Part of the study plan for: Backend Engineer · Full Stack Engineer · Data Engineer
Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.
-
Why should data integrity be enforced in the database, not only in application code?
Constraints (NOT NULL, UNIQUE, FOREIGN KEY, CHECK, exclusion constraints) are enforced for every writer, including scripts, migrations, other services and race conditions that application checks…
-
Why shouldn't analytics queries run on the production OLTP database?
Analytical queries scan large amounts of data and can saturate CPU, I/O and locks, slowing user-facing transactions. Use read replicas for light reporting, or replicate data to an OLAP warehouse…