Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mastering DynamoDB

You're reading from  Mastering DynamoDB

Product type Book
Published in Aug 2014
Publisher Packt
ISBN-13 9781783551958
Pages 236 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Tanmay Deshpande Tanmay Deshpande
Profile icon Tanmay Deshpande

Secondary indexes


A primary key attribute allows us to create, maintain, and access data efficiently. To do so, DynamoDB creates indexes on those primary attributes as we have seen in the previous section. However, sometimes there might be a need to search and access items from attributes that are not part of the primary key. For all such needs, DynamoDB supports secondary indexes that can be created on attributes other than the primary key and can be accessed and searched in a manner similar to the primary key.

A secondary index contains a subset of attributes from the given table having an alternative key to support query operations. Secondary index allows users to search attributes other than the primary key, which makes DynamoDB useful for a varied set of applications. We can create multiple secondary indexes for a given table. If we don't create secondary indexes, the only option to get the item for a certain non-primary key attribute is to scan the complete table, which is a very expensive...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}