1 Answer
- Newest
- Most votes
- Most comments
1
You should probably add more to the sort key like a gameplay_id for the particular play of the game. So your SK becomes "1234#de45a" which is a game_id#gameplay_id concatenated together where de45a is the particular run of the game. Then every game play is tracked, and you can easily query to find all plays by a user, all plays of a user for a particular game, and any particular game play.
You might have different query needs. The data model you pick is directly based on the update and query pattern. I'm just guessing at your query pattern.
answered 2 years ago
thank you!
Sure thing, feel free to accept the answer.
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 3 months ago
Hi Steven, what does the game_id stand for?
Because, in case of 1) you'd might need more keys if you want more than one result per user+game.