Next: core-concepts-in-dynamodb
DDB is a Key-Value or wide-column data model. For simple access patterns, Key-Value shines, since you get constant time access for any one record in the table.
In a wide-column store, each record in the hash table is a B-tree. This allows for fast range queries.
The HTTP connection model (compared to the TCP model found in MySQL and Postgres) allow you to avoid creating a connection pool to begin querying.
IAM allows for convenient management and dovetails into being Infrastructure as code friendly.
RCUs and WCUs can be scaled up independently, compared to with a traditional database, where they both are bought in tandem (more RAM, more disk space). You can also start out with On-Demand Pricing to learn about your usage, or to handle spiky workloads, before allocating a set amount of RCUs and WCUs.
DynamoDB streams allows you to read a transactional log of each write transaction in a DynamoDB table.
It’s fully managed, which lowers overhead on maintenance, which managed databases have a lot of.
RDBMS made sense to conserve on storage. Data would be written once, in a normalized format. But the pricing of disk went down drastically, from 200,000 per GB in 1980 to 0.03 per GB in 2014.
In 2004, Amazon built “Dynamo” to deal with hyperscale for their own databases.
Their reasons for creating dynamo were:
Inability to use advanced relational features at scale: 70% of their operations operated on a single record, and 20% would return multiple rows in the same table. Thus, 90% of queries didn’t use joins.
Consistency was expensive: for Amazon, consistency wasn’t as important as availability. This let dynamo scale performance in exchange for a bit of correctness.
AWS Lambda popularized the notion of event-driven compute. By moving from a model where hardware needed to be allocated to a model where code would run on demand, and dynamodb pairs well with that.
MongoDB is a document database, which allows for richer querying patterns after the fact, and lots of index types, like text, geospatial, and multi-key indexes.
Cassandra is Wide-column store, which dynamodb can take the place of. But it’s hard to beat dynamodb’s managed options