Primary Keys / Secondary Indexes

Last updated

What is Primary Keys / Secondary Indexes?

DynamoDB supports two types of primary keys, namely Partition Key and Composite Key (Partition Key and Sort Key). A Partition Key, also known as a hash key, is a simple primary key that has a scalar value (a string, a number, or a binary blob). DynamoDB uses the partition key's value to distribute data across multiple partitions for scalable performance. A Composite Key consists of two attributes. The first attribute is the partition key, and the second attribute is the sort key. DynamoDB uses the partition key to spread data across partitions and also uses the sort key to store items in sorted order within those partitions. This sort key provides further granular control over data organization.

Free resources to learn Primary Keys / Secondary Indexes

More in stage 12: DynamoDB

Primary Keys / Secondary Indexes: common questions

Can I learn Primary Keys / Secondary Indexes in Hindi?

This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Primary Keys / Secondary Indexes in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.

Is this Primary Keys / Secondary Indexes tutorial for beginners?

It is lesson 66 of 101 in the free AWS roadmap, in stage 12, DynamoDB. If you are new to AWS, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.

Still confused? Ask me