How do relational and non-relational databases differ, and what changes in the test approach?
Answer
Relational databases organize data into tables with declared relationships, constraints and transaction semantics, while non-relational systems use models such as documents, key-value pairs, wide columns or graphs. The choice changes query patterns, consistency guarantees, schema enforcement and scaling behaviour. Testers should verify the product's actual data model, integrity rules, concurrency guarantees, failure recovery and supported query paths instead of assuming every database behaves like SQL.
Strong answer includes
- contrasts data models and consistency guarantees
- connects architecture choices to test scope
- avoids treating NoSQL as one uniform technology
Practical example
Runs against the resettable SQLite sample database used by the playground.
Run the query to see the result.
The foreign-key relationship gives the query an explicit join path. A document database may instead embed customer data inside the order, so the equivalent test focuses on duplicated embedded values and update consistency rather than JOIN correctness.
Expected result: Paid orders paired with an existing customer row.