What is Amazon DynamoDB?

Amazon DynamoDB is a fully managed key/value document store offered by AWS. It allows you to have a high performant database at any scale. Amazon builds DynamDB for their internal use and later offered it as a service to their customers as well. Amazon DynamoDB is a multi-region, a multi-active durable database that supports security, backups, restore, scale, encryption etc. by default. You can build highly scalable applications using Amazon DynamoDB.

History of Amazon DynamoDB

Amazon DynamoDB was created by Amazon after they realised that the current database solutions are no longer serving their needs of high traffic and performance. After robust testing of the database, Amazon released it for their users to use it. If you like to read more about the history of Amazon DynamoDB and its initial days, give a read to an article by Amazon CTO: Amazon DynamoDB – a Fast and Scalable NoSQL Database Service Designed for Internet Scale Applications

DynamoDB Key Terms

Following are some key terms you should know while working with Amazon DynamoDB.

  • Table: The table is a collection of items stored in the Amazon DynamoDb.
  • Item: The item is a document with a collection of various attributes.
  • Primary key (Partition key): The partition key is the primary key in the DynamoDB table. It must be unique. DynamoDB uses the partition key to generate a hash and store all the data with the same has in the same place.
  • Primary Key (Partition key and sort key): This is a composite primary key which means a combination of two keys. The partition key is used to generate a hash for defining the partition and all the data related to that partition will be stored in the same place but will be sorted on the basis of the sort key.
  • Secondary indexes: You can create indexes on your DynamoDB table as per your access patterns. There are two types of secondary indexes are available. They are
    Global Secondary Index: An index with a different partition key and sort key.
    Local Secondary Index:An index with the same partition key but the different sort key.
  • Stream: It is an optional feature where all the changes in a DynamoDB table are recorded in the order of their execution. The stream information can be used for further processing of the data like triggering a side effect when a new record is inserted in the table.

That\’s it for now. I will add more articles and code examples for working with Amazon DynamoDB.