Compare Amazon RDS with DynamoDB

Amazon RDS vs DynamoDB

Amazon RDS vs DynamoDB

RDS and DynamoDB are both database services offered by AWS. You might be asking yourself, “If they’re both databases, then what’s the difference?” This is often brought up by new students and it’s an important question to ask (because it will come up in your exam A LOT). Being able to decide whether to go with DynamoDB or a certain type of RDS database will help you stand out from the crowd. In this article, we’ll dive into the defining features of both and when to use them. But first, let’s review why we need databases in the first place.

Databases

If you ‘Google’ the basic definition of a database, you’ll find something along the lines of “a place to easily store and access data” or that “databases store records efficiently.” Both of these statements are helpful, but they don’t quite show how databases are used in real world applications. 

Businesses use databases to store and access data in ways that you might not even realize. For example, user log-in information is stored in a database. All the items on your favorite online shopping website are cataloged in a database. Even some of your favorite games use AWS databases. All that to say, we interact with databases ALL THE TIME and AWS has made it easier than ever to get started. So, let’s take a look at the two main databases on AWS: RDS and DynamoDB. 

Amazon RDS

Amazon RDS stands for “Relational Database Service”. What does this service do? Well, RDS enables users to launch a relational database on AWS. But unlike DynamoDB – Relational Database Service is NOT the name of a database engine. It’s the name of a service that allows you to launch your perfect relational database. 

With RDS you can choose from a wide variety of instance types and database engines. For example, when using RDS you could launch a relational database like AWS Aurora or MySQL. DynamoDB differs from RDS in this aspect as DynamoDB is both the service and database engine.

Before cloud technology, setting up a database was a costly and time-consuming process. But now, databases can be launched after clicking just a few buttons. Amazon RDS makes it SUPER easy to set up, manage, and scale a relational database. Some of the features that make it so easy to use are automation of mundane tasks like patching and backups, resizing, high availability, and fast performance. 

With RDS you have six database engines to choose from, including Amazon Aurora, PostgreSQL, MySQL, MariaDB, Oracle Database, and SQL server. RDS also integrates with AWS Database Migration Service (DMS) to make moving your existing database to the cloud that much easier. RDS is also scalable in that if you had originally provisioned a configuration with either too much or too little capacity, your database can be reconfigured to meet current needs with minimal downtime.

If you only need more read capacity you can add a Read Replica which will take some load off your main database. Amazon RDS can also be enabled with Multi-AZ so as to make it highly available should something go wrong.

Amazon DynamoDB

As for Amazon DynamoDB, well, it’s a fully-managed database for unstructured data (NoSQL). DynamoDB is a single database service and is NOT an umbrella term for a complete service. With DynamoDB, AWS will take care of all the “behind-the-scenes” management to ensure your key-value pair database runs smoothly and without a lot of overhead. It is a great solution for unstructured data as opposed to RDS which is meant for well-structured data but we’ll get into all of that below. 

DynamoDB is a key-value database that is EXTREMELY fast. If ever on your test you see a scenario where you’re to choose a millisecond performance database, then DynamoDB is most likely the right answer! No matter the scale of requests, DynamoDB will always perform well and that’s because it’s a highly scalable and elastic, fully managed database. Amazon makes sure your database has built-in security, backup and restore, and caching to make it as efficient as possible.

In fact, this is the same database that Amazon developed for their own shopping website because other databases couldn’t quite perform as well as they needed. An interesting fact about DynamoDB is that it “can handle more than 10 trillion requests per day and can support peaks of more than 20 million requests per second” (AWS). That’s extremely powerful stuff!

DynamoDB is the key-value database solution for many different industries. It’s used in mobile and web applications. I’s used for gaming, IoT, and pretty much anything that demands low-latency data access. But for the user, all you need to do is create the table and watch DynamoDB take care of the rest.

You’re going to see lots of scenarios come up in your exam asking you about whether to use RDS or DynamoDB. I recommend studying the table below to get a good grasp of the differences between these two services. 

Comparison Table

DB Options  RDS DynamoDB
Type of Database Relational Database Key-value
Defining Features Relational data models;
Complex queries, joins, and updates
Unorganized data models;
Used for Transactions
Use Cases  Traditional relational database for OLTP;
Well-formed data structure;
Existing app requires an RDS
Name/value pair data;
Unpredictable data structure;
High I/O needs
Scales dynamically
Availability   

Multi-AZ enabled SLA: 99.95%

 

SLA: 99.99%
Scalability Vertical scaling with interruptions in application Seamless, on-demand horizontal scaling
Performance  Automatically optimized for the scenario by AWS system  Depends on data model, indexing, queries ran, and storage optimization
Encryption  AES-256 encryption for data on RDS DB server AWS KMS for encrypting data at rest
Pricing On-Demand: Pay for what you use;
More expensive than Reserved Instances

Reserved Instances: One or Three years (predictable long-term usage)

Pricing is based on instance configuration, database type, and duration
On-Demand: charges for the data reads and writes your app performs on the table (unpredictable traffic)

Provisioned: specify the estimated number of reads and writes per second (predictable traffic)

RDS vs DynamoDB Summed Up

  • RDS makes it easy to set up, operate, and scale a relational database.
  • DynamoDB is an AWS fully-managed, high-performance, NoSQL database. 

I hope that clears up DynamoDB and RDS for you! Of course, we can only cover so much in an article but check out our AWS training courses to really learn how these services work.

Check out our AWS Training Courses!

At Digital Cloud Training we provide the highest quality AWS training courses in the market at affordable prices. Our training options include:

  • Video-based training courses that seamlessly blend theoretical education with hands-on practice so you can not only prepare to answer tricky exam questions but learn critical hands-on skills that will set you up for your next job.
  • Practice tests with large banks of questions that reflect the style and difficulty of the real AWS exam so you can be well prepared to easily pass your exam on the day. All questions come with detailed explanations and reference links and the tests are offered in multiple formats for training and exam simulation.
  • Cheat Sheets and eBooks that help you to memorize and cross-check key facts you need to know for the exam and also take your studies offline. These are great resources for final exam preparation.

Check out our catalog of courses now to get started with your AWS certification journey.

Got Questions?

Contact us here.

Responses

Your email address will not be published. Required fields are marked *