Amazon DynamoDB Concepts
External
Internal
Overview
Amazon DynamoDB is a managed NoSQL database service.
Table
A table is a collection of items. A table contains zero or more items. An item is a group of attributes that is uniquely identifiable among all other items. Items are similar in many ways to rows, records or tuples in other database systems. There is no limit to the number of items that can be stored in a table.
When a table is created, its primary key must be specified. Other than the primary key, tables do not have schemas, which means that neither the attributes nor their data types need to be defined beforehand.
Item
An item is a collection of attributes. Each item can have its own distinct attributes.
Primary Key
DynamoDB uses primary keys to uniquely identify each item in a table. There are two types of primary keys: partition key and partition and sort key. Each primary key attribute must be a scalar (string, number, or binary).
Partition Key
A simple primary key defined by one attribute. In a table that has only a partition key, no two items can have the same partition key value. DynamoDB uses the partition key's value as input to an internal hash function. The output from the hash function determines the partition (physical storage internal to DynamoDB) in which the item will be stored. The partition key of an item is also known as its hash attribute.
Partition Key and Sort Key
A primary key may be composite, in that it is defined by two attributes: the partition key and the sort key. The partition key is used as described above. All items with the same partition key value are stored together, in sorted order by sort key value. In a table that has a partition key and a sort key, it's possible for two items to have the same partition key value. However, those two items must have different sort key values. The sort key of an item is also known as its range attribute. The term range attribute derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
Attribute
An attribute is a fundamental data element, something that does not need to be broken down any further.
Nested Attributes
DynamoDB supports nested attributes up 32 levels deep.
Data Types
Scalar
Number
String
Secondary Index
TODO: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.CoreComponents.html
DynamoDB Stream
TODO:
- https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.CoreComponents.html
- https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.API.html#HowItWorks.API.Streams
Encryption at Rest
Point-in-time Recovery
API
Control Plane
Control plane operations let you create and manage DynamoDB tables. They also let you work with indexes, streams, and other objects that are dependent on tables.
Data Plane
Data plane operations let you perform create, read, update, and delete (also called CRUD) actions on data in a table.