How many types of secondary indexes does DynamoDB support?

A scope has been handed to you to set up a super fast gaming server and you decide that you will use Amazon DynamoDB as your database. For efficient access to data in a table, Amazon DynamoDB creates and maintains indexes for the primary key attributes. A secondary index is a data structure that contains a subset of attributes from a table, along with an alternate key to support Query operations.

How many types of secondary indexes does DynamoDB support?
A .  2
B .  16
C .  4
D .  As many as you need.

Answer: A

Explanation:

DynamoDB supports two types of secondary indexes:

Local secondary index â€• an index that has the same hash key as the table, but a different range key. A local secondary index is "local" in the sense that every partition of a local secondary index is scoped to a table partition that has the same hash key.

Global secondary index â€• an index with a hash and range key that can be different from those on the table. A global secondary index is considered "global" because queries on the index can span all of the data in a table, across all partitions.

Reference: http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/SecondaryIndexes.html

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments