
Amazon DynamoDB is a fast, flexible, serverless NoSQL database service that delivers single-digit millisecond performance at any scale.
DynamoDB supports two main data models: key-value and wide-column. These data models are highly efficient for retrieving items.
The key-value data model allows you to retrieve one item at a time using a primary key. It functions like a massive hash, enabling fast retrieval when the primary key is known.
For more complex access patterns, you can use the wide-column data model provided by DynamoDB. In this model, the hash is still required, but the value for each hash record is a B-tree. A B-tree is a data structure that enables quick element retrieval and range queries.
DynamoDB organizes data into tables. You can create or delete a table with a simple API call. Each table contains items, and each item has attributes. Every item requires at least one attribute, which is the partition key. Optionally, you can define a sort key, which becomes another required attribute for each item.
The combination of the partition key and sort key (if defined) forms the primary key, which must be unique. Each item can also have additional attributes, and the set of attributes can vary from item to item.
DynamoDB also supports secondary indexes. While primary keys allow access to data, secondary indexes provide alternative ways to retrieve data efficiently. There are two types of secondary indexes: local secondary indexes and global secondary indexes.
DynamoDB offers three main types of operations:
DynamoDB is a cloud-based NoSQL database service that charges customers based on the amount of data stored and the amount of data read and written. The pricing is as follows:
For detailed information on DynamoDB pricing, refer to the Amazon DynamoDB Pricing page.