-
Get to know each other
-
Compare and contrast DynamoDB data modeling to relational data modeling
-
Describe the importance of partitioning in DynamoDB
|
Think of an online multiplayer game.
What are some "entities" involved? |
What are some access patterns? |
Suppose we want to query for all the usernames of users in a particular game.
Star Schema | Pros | Cons |
---|---|---|
|
|
|
Entity | Partition Key (a.k.a. HASH) | Sort Key (a.k.a. RANGE) |
---|---|---|
User |
|
|
Game |
|
|
UserGameMapping |
|
|
Query multiple entities in one request to one table
resp = dynamodb.query(
TableName='battle-royale',
KeyConditionExpression="PK = :pk AND SK BETWEEN :placeholder AND :users",
ExpressionAttributeValues={
":pk": { "S": "GAME#{}".format(game_id) },
":placeholder": { "S": "#PLACEHOLDER#{}".format(game_id) },
":users": { "S": "USER$" },
},
ScanIndexForward=True
)
-
What are 3 things you learned?
-
What are 2 things you found interesting?
-
What’s 1 question you still have?
-
Get to know each other
-
Describe the importance of partitioning in DynamoDB
-
Compare and contrast DynamoDB data modeling to relational data modeling