Serverless Developer Guide
add query ﬂexibility to get all inventory. This is not a DynamoDB requirements, just a convention 
by the developer to make retrieval more ﬂexible.
All of the data for account1234 will be stored in the same database partition to ensure retrieval of 
related data is quick.
Related resources:
• Item collections - how to model one-to-many relationships in DynamoDB - example of using 
an item collection, a group of related items that share the same partition key value, as a way to 
model one-to-many relationships
• Characteristics of databases - comparison of SQL and NoSQL qualities of DynamoDB
Reading data
DynamoDB is a non-relational NoSQL database that does not support table joins. Instead, 
applications read data from one table at a time. There are four ways to read data:
• GetItem – Retrieves a single item from a table. This is the most eﬃcient way to read a single 
item because it provides direct access to the physical location of the item. (DynamoDB also 
provides the BatchGetItem operation, allowing you to perform up to 100 GetItem calls in a 
single operation.)
Fundamentals 76