Welcome to the DynamoDB vs RDS lesson. When architecting an application on AWS, one of the most critical decisions you will make is choosing between a Relational database (RDS) and a Non-Relational database (DynamoDB).
Using a relational database for a massive, unstructured data feed will cause massive performance bottlenecks. Conversely, using a NoSQL database for complex financial accounting can lead to data integrity issues. You must use the right tool for the job.
In this tutorial, you will learn the core differences between SQL (RDS) and NoSQL (DynamoDB).
| Feature | Amazon RDS (SQL) | Amazon DynamoDB (NoSQL) |
|---|---|---|
| Data Structure | Strict tables with columns and rows. | Flexible key-value pairs (JSON documents). |
| Scaling | Scales Vertically (Up). Hard to scale horizontally. | Scales Horizontally (Out) infinitely. |
| Complex Queries | Excellent. Uses complex JOIN operations. | Poor. Not designed for complex JOINs. |
| Server Management | You manage the EC2-like instances. | Fully Serverless. No instances to manage. |
| Best Use Cases | ERPs, CRMs, Financial ledgers. | User profiles, IoT data, Shopping carts. |
You are building a shopping cart for an e-commerce site where the data structure frequently changes. You need single-digit millisecond latency at massive scale. Which service do you choose?