Choosing relational vs NoSQL managed databases
data model and access pattern fit.
choose relational for complex relationships, joins, flexible queries, and strong transactions; choose NoSQL for known access patterns needing massive horizontal scale.
WHAT THIS TESTS The interviewer wants to see that you choose a database from data model, access patterns, consistency, and scale needs rather than reaching for whatever is fashionable.
A GOOD ANSWER COVERS Reach for a relational service like RDS when your data is structured and highly interrelated, when you need to run joins and ad hoc or evolving queries that you cannot fully predict upfront, and when strong ACID transactions across multiple rows or tables matter, such as financial or inventory systems. Relational engines enforce a schema and referential integrity, which is valuable for data correctness, and SQL gives flexible querying. The tradeoff is that scaling writes typically means scaling up the instance, with horizontal scaling being harder. Reach for a NoSQL service like DynamoDB when your access patterns are well understood and relatively simple, often key-based lookups, when the schema is flexible or sparse, and when you need to scale horizontally to very high throughput with consistent low latency regardless of table size. The cost is that you must model the table around known access patterns, joins and ad hoc queries are awkward or impossible, and complex multi-item transactions and consistency are more limited. The decision drivers are query flexibility versus predictable patterns, transactional and consistency requirements, and the scale and latency profile you need.
COMMON WRONG ANSWERS Claiming NoSQL is simply newer and therefore better, ignoring relational strengths in joins and transactions. Saying relational cannot scale at all, when it scales well within limits. Picking based on familiarity or hype rather than access patterns.
LIKELY FOLLOW-UPS How does DynamoDB single-table design handle relationships? When do you need multi-row ACID transactions? How does each scale reads versus writes?
ONE CONCRETE EXAMPLE An order system with customers, orders, and line items that needs joins, reporting queries, and transactional consistency fits RDS, while a high-traffic session store with simple key lookups and huge scale fits DynamoDB.
Read the original → aws.amazon.com
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.