8. SQL vs NoSQL
Interview questions
Interview questions (with the counter-questions you'll get)
Q1. SQL or NoSQL: how do you decide?
They're testing: reasoning from access patterns, not fashion.
Think about your answer first, then open it.
Q2. Explain ACID.
They're testing: precise definitions with an example.
Think about your answer first, then open it.
Q3. What is normalisation, and when would you denormalise?
They're testing: trade-off thinking.
Think about your answer first, then open it.
Q4. What are the main types of NoSQL databases?
They're testing: breadth and fitting each to a use.
Think about your answer first, then open it.
Q5. Why do many NoSQL databases not support joins?
They're testing: the link between distribution and data modelling.
Think about your answer first, then open it.
Q6. What's the difference between schema-on-write and schema-on-read?
They're testing: understanding "schemaless".
Think about your answer first, then open it.
Q7. Would you put payments in a NoSQL database?
They're testing: judgement about correctness.
Think about your answer first, then open it.
Q8. When would you use a graph database?
They're testing: knowing its niche.
Think about your answer first, then open it.
Q9. Can a relational database store JSON? Then why use a document store?
They're testing: knowing the line has blurred.
Think about your answer first, then open it.
Q10. How would you model the bookstore's orders in a document store?
They're testing: applying denormalisation carefully.
Think about your answer first, then open it.