DBDB.io The Encyclopedia of Database Systems · Est. 2017
Database of Databases

Database Entry

DynamoDB


DynamoDB is a managed NoSQL database service provided by Amazon Web Services. As it is managed by Amazon, users do not have to worry about operations such as hardware provisioning, configuration, and scaling.[04]

The offering primarily targets key-value and document storage.

Database Entry

DynamoDB


DynamoDB is a managed NoSQL database service provided by Amazon Web Services. As it is managed by Amazon, users do not have to worry about operations such as hardware provisioning, configuration, and scaling. The offering primarily targets key-value and document storage.[04]

History[05][06]


Amazon runs an e-commerce platform for millions of concurrent users, so the underlying services powering the platform must be highly reliable and scalable. Failures in infrastructure would have significant financial consequences and would degrade consumer trust in Amazon's platform. Thus, the motivating purpose behind DynamoDB was a data-store used by these services that could keep up in both availability and scalability such that infrastructure failures would not affect user experience.

The original concept and implementation of DynamoDB was first introduced in 2007 with a paper titled: "Dynamo: Amazon’s Highly Available Key-value Store". As DynamoDB is a proprietary, managed service from AWS, they have not published detailed information regarding the internals of the platform since the original paper.

The managed DynamoDB service was launched by AWS in January of 2012, with pricing being based on throughput rather than storage.

Checkpoints


Unknown.

Compression[07]


DynamoDB does not natively support compression. However, users can compress large attributes into binary data using compression algorithms like LZO or GZIP.
These compression algorithms are available via the AWS SDK.

Concurrency Control[08]


Users have the ability to enable Optimistic Locking for DynamoDB using the AWS Java SDK. For example, they can specify a property with the annotation: @DynamoDBVersionAttribute which is then designated to store the version number used for optimistic locking.
For conflict resolution, DynamoDB employs a "last writer wins" policy.

Data Model[09]


DynamoDB is a schemaless, NoSQL database. Each table requires a primary key to identify its corresponding data item. However, there are no such constraints on non-key attributes.
DynamoDB can hold both structured or semi-structured data, such as JSON or XML.

Foreign Keys[10]


DynamoDB does not natively support foreign keys as it is not a relational database.

Hardware Acceleration


Unknown.

Indexes


Unknown.

Isolation Levels[11]


Although DynamoDB was originally not designed for transactions, AWS has subsequently published a library that supports them. With the library, DynamoDB has three configurable isolation levels for transactions: Read Uncommitted, Read Committed, and Repeatable Reads.

However, neither DynamoDB nor the library support locking for range queries, thus phantom reads can potentially result in phantom reads.

Joins[12]


DynamoDB does not support joins natively as it is a key-value store and not a relational database.
However, Amazon's EMR (Elastic MapReduce) service supports joining DynamoDB tables.

Logging[13]


Although there are no public implementation details on DynamoDB's internal logging schema, external users can log DynamoDB API operations via AWS CloudTrail.
When enabled, AWS CloudTrail logs the DynamoDB API calls made by the user in a JSON format, then stores it in an Amazon S3 bucket.

Query Compilation


Unknown.

Query Execution


Unknown

Query Interface[14][15]


As DynamoDB is hosted by AWS and is a NoSQL database, users must query the database through the internet using the DynamoDB (RESTful) API or SQL statements.
Users can send SQL statements over the network or use the API endpoints via the AWS Management Console, the AWS CLI, or the AWS SDKs.

Storage Architecture[05]


DynamoDB supports a pluggable local persistence engine that can range from in-memory buffers with persistent backing to purely disk-oriented ones. This allows it to be flexible with an application's access patterns.
Known storage engines used by DynamoDB include the Berkeley Database Transactional Data Store and MySQL.

Storage Model[05]


DynamoDB uses a Key-Value storage model.

Stored Procedures[16][17]


Although DynamoDB doesn't natively support stored procedures, users can use AWS Lambdas for a similar effect.
For example, users can have Lambda functions process incoming DynamoDB stream data and have it be triggered when a specific action is performed on DynamoDB.

System Architecture[05]


One of the most interesting things about DynamoDB is its system architecture which is tailored for high availability and scalability. It utilizes many novel distributed systems techniques to deliver the final product. The highlights of these techniques are outlined below:

The system is distributed across multiple nodes for availability, and it employs consistent hashing to partition data across these nodes. Read about consistent hashing on: Wikipedia.

For membership and failure detection, DynamoDB utilizes a gossip-based protocol. This allows DynamoDB to be decentralized and require minimal manual administration. Read about gossip protocol on: Wikipedia.

To handle temporary failures, DynamoDB uses a Sloppy Quorum with hinted handoff. This technique allows DynamoDB to be available and durable despite network partitions and server failures. Read about Sloppy Quorum and hinted handoff here.

Views[16][18]


DynamoDB does not natively support materialized or virtual views. However, customers can use DynamoDB Streams for Cross-Region Replication for similar use cases as materialized views.

Furthermore, AWS encourages the use of DynamoDB as a materialized view for relational systems.

Citations

19 sources
  1. Fast NoSQL Key-Value Database – Amazon DynamoDB – AWS amazon.com
  2. Amazon DynamoDB Documentation amazon.com
  3. Amazon DynamoDB - Wikipedia wikipedia.org
  4. Amazon DynamoDB - Developer Guide amazon.com
  5. Microsoft Word - sosp067-decandia1.doc allthingsdistributed.com
  6. Amazon switches on DynamoDB cloud database service | ZDNET zdnet.com
  7. Best practices for storing large items and attributes in DynamoDB - Amazon DynamoDB amazon.com
  8. DynamoDB and optimistic locking with version number - Amazon DynamoDB amazon.com
  9. Learn how to go from SQL to NoSQL - Amazon DynamoDB amazon.com
  10. What is Amazon DynamoDB? - Amazon DynamoDB amazon.com
  11. dynamodb-transactions/DESIGN.md at master · awslabs/dynamodb-transactions · GitHub github.com
  12. Export, import, query, and join tables in DynamoDB using Amazon EMR - Amazon EMR amazon.com
  13. Logging DynamoDB operations by using AWS CloudTrail - Amazon DynamoDB amazon.com
  14. Querying tables in DynamoDB - Amazon DynamoDB amazon.com
  15. Differences in querying a table - Amazon DynamoDB amazon.com
  16. Migrating to DynamoDB from a relational database - Amazon DynamoDB amazon.com
  17. Forums | AWS re:Post repost.aws
  18. DynamoDB streams use cases and design patterns | AWS Database Blog amazon.com
  19. https://www.allthingsdistributed.com/2012/01/amazon-dynamodb.html allthingsdistributed.com
Revision #50 Last Updated: