Recall & Review
beginner
What is a secondary index in DynamoDB?
A secondary index is a data structure that lets you query the table using an alternate key, different from the primary key.
Click to reveal answer
beginner
How do secondary indexes enable flexible queries?
They allow you to search data using different attributes without scanning the whole table, making queries faster and more efficient.
Click to reveal answer
intermediate
What are the two types of secondary indexes in DynamoDB?
Global Secondary Index (GSI) and Local Secondary Index (LSI). GSIs can have different partition and sort keys, LSIs share the partition key but have a different sort key.
Click to reveal answer
beginner
Why is using a secondary index better than scanning the whole table?
Because it lets you directly access the data you want using an alternate key, avoiding slow and costly full table scans.
Click to reveal answer
intermediate
Can secondary indexes be updated independently from the main table in DynamoDB?
No, secondary indexes are automatically updated by DynamoDB when the main table data changes, keeping them in sync.
Click to reveal answer
What does a secondary index in DynamoDB allow you to do?
✗ Incorrect
Secondary indexes let you query data using keys other than the primary key.
Which type of secondary index can have a different partition key than the main table?
✗ Incorrect
Global Secondary Indexes can have different partition and sort keys from the main table.
Why are secondary indexes useful for flexible queries?
✗ Incorrect
Secondary indexes let you query efficiently without scanning the entire table.
What happens to secondary indexes when you update the main table?
✗ Incorrect
DynamoDB automatically updates secondary indexes to keep them in sync with the main table.
Which secondary index shares the same partition key as the main table?
✗ Incorrect
Local Secondary Indexes share the partition key but have a different sort key.
Explain how secondary indexes improve query flexibility in DynamoDB.
Think about how you can search data differently without slowing down.
You got /4 concepts.
Describe the difference between Global Secondary Index and Local Secondary Index.
Focus on keys and how they affect querying.
You got /4 concepts.