Overview

This chapter includes a number of case studies, each exploring a way to model data in DynamoDB for a particular scenario. Sometimes, seeing a single example is better than reading pages of documentation.

This chapter is intended to grow over time. Are there particular use cases you'd like to see? Hit me up and let me know!

Available examples:

  • Building a global leaderboard using write sharding

    Learn how to organize your DynamoDB to allow for leaderboard-like queries -- "What are the most-viewed items in my table?" "Which users have the top score in my game?"

    You will also learn how to use write-sharding and scatter-gather queries to alleviate write throttling for high-usage keys.

  • Modeling hierarchical data*

    This example shows how to model hierarchical data. It includes a full code sample that uses >25,000 Starbucks store locations. Learn how to satisfy multiple access patterns, including finding all stores in a particular state, all stores in a particular city, and all stores in a particular zip code.

Planned examples:

  • Time-based workflows*
  • Enum attributes*
  • Working with large items*
  • ACID transactions*
  • Geo-hashing*
  • Graph queries and adjacency lists*

* -- Example from Rick Houlihan's excellent 2017 reInvent talk.

Want to learn more about DynamoDB data modeling?

Get the DynamoDB Book!

The DynamoDB Book is a comprehensive guide to modeling your DynamoDB tables

Learn the how, what, and why to DynamoDB modeling with real examples

I want the book!