Comparison between Dynamo DB vs. Relational Databases

Nadtakan Futhoem
3 min readApr 18, 2021
DynamoDB vs RDS and another NoSQL

Amazon DynamoDB

NoSQL & Queries via API call — you won’t be writing SQL queries to read and write data. Instead, you’ll need to make calls to specific DynamoDB APIs with names like PutItem, GetItem, or query.

Flexible column schema — DynamoDB is also schemaless so you don’t have to define a fixed table structure in advance. When you insert a DynamoDB record, it can have any attribute that it needs. so you can adjust columns and data types on the fly.

“Infinitely” scalable — DynamoDB was designed from the beginning to extremely scalable. Your data can grow to many terabytes, with hundreds of thousands of reads and writes per second. You don’t need to have to manage the servers or the partitions, this is all handled for you by AWS. It’s much more difficult to do this in a relational database because of the way data structures like indexes work in a relational system.

Eventually consistent — this flexibility means that DynamoDB doesn’t follow the typical ACID properties of atomicity, consistency, isolation, and durability. Data in DynamoDB is quite durable but because of the way data is replicated across the AWS infrastructure, it’s only eventually consistent if you modify a record and then read it back, you may sometimes receive the older version of the data until the data is fully consistent across all three replicates.

Always hosted on AWS — be aware of using DynamoDB will tie you to AWS. There aren’t really options for hosting DynamoDB databases except using the AWS public cloud. If you need to keep all your data on-premises, or if you want to be able to easily switch cloud hosting vendors, then DynamoDB might not be right for you.

Document store — DynamoDB is considered a document-oriented database much like MongoDB. The database can understand a little bit about the structure of each record or document but each item can have its own unique structure. Other NoSQL databases are in different categories. For example, HBase is a column store.

Eventually consistent — DynamoDB only supports an eventual consistency model. Some other NoSQL databases can be used on a single service where there’s no need to worry about consistency across a cluster. Or they can be used in a mode that enforces strict consistency across the cluster.

Transparently scalable — DynamoDB scales transparently to the users. it doesn’t matter whether your table has 10 rows or 10 billion rows. You don’t have to do anything differently as your tables grow. Many other NoSQL databases do allow you to scale up as your data grows. But you’ll have to manage individual servers or add servers to the clusters as you need them.

Managed by AWS — Always managed by AWS. This is great because it reduces the operational burden for your team, but again it means that you are tied to the AWS public cloud.

Summary

Amazon DynamoDB — Use Amazon DynamoDB if you want a fully managed database that can scale easily, and you don’t mind learning new concepts.

Amazon Relational Database Service — if you want to manage database instances using a standard relational database that you already know.

Hosting your own Database — if you concerned about giving control of your data to a hosting provider. or if you need the data to live on-premises, then you should probably host your own database either in the cloud or in your own data center.

Thank you for reading and please clap or share the article if you like it.

Follow me on Twitter or LinkedIn if you like.

Nadtakan Futhoem — Sr. Software Engineer

--

--