
Secondary indexes: Secondary indexes are used for additional access patterns that cannot be satisfied only by the primary key.ĭynamoDB supports two kinds of secondary indexes: Items with the same partition key will be stored in the same partition, but ordered by the sort key’s value. Any two or more items that have a matching partition key should have a distinct sort key. A sort key is a field that is used to determine the order of the data. In instances where two items have a similar partition key, a sort key is used to identify them uniquely. Partition key and sort key: The two constitute a composite key. The output from the hash function determines the partition (physical storage internal to DynamoDB) in which the item will be stored", Amazon DynamoDB Documentation. “ DynamoDB uses the partition key’s value as input to an internal hash function. A partition key is named based on the internal working of DynamoDB. In this, the partition key is sufficient to identify each item uniquely. Partition Key: This forms a simple primary key with only the partition key. Primary key: The primary key is unique for each item.

Items are allowed to have nested attributes. Each item is uniquely identifiable.Īttributes: Attributes are equivalent to columns or fields in a relational database. Items can be compared to rows in a relational database. Items: A table is made up of zero or more items. For instance, you can have a table that stores student details. This is similar to other database systems. The article SQL or NoSQL - Which Database is Ideal will come in handy.

It is recommended you get to know the differences between an SQL and a NoSQL database.

Non-relational databases are also referred to as NoSQL databases, DynamoDB being one of them. Most of the time, we are introduced to relational databases. This article is suitable for any reader interested in digging into DynamoDB. It comes without the administrative burdens of setting up, replication, and scaling, among others. The product is a managed NoSQL database service that offers top-notch performance. DynamoDB is a platform as a service (PaaS) AWS product.
