Data Modeling Core Concepts for Amazon Dynamodb Dat329

Title

AWS re:Invent 2023 - Data modeling core concepts for Amazon DynamoDB (DAT329)

Summary

  • Greg Crum and Akshat Vig presented on data modeling for Amazon DynamoDB.
  • They emphasized the importance of schema design for scalability and future use cases.
  • Key DynamoDB concepts include the absence of clusters, servers, instances, and maintenance windows, focusing on tables and items with partition and sort keys.
  • They discussed the use of Global Secondary Indexes (GSIs) for many-to-many relationships and data perspective shifts.
  • A fictional e-commerce platform was used as a use case to illustrate data modeling, focusing on entities, access patterns, and entity size.
  • The presenters discussed the choice between single-table and multi-table designs, considering factors like workload priority, access control, and downstream services.
  • Vertical partitioning was introduced as a strategy to optimize cost by breaking large items into smaller, more manageable items.
  • Sparse secondary indexes were explained as a means to improve query performance and reduce costs.
  • The session concluded with key principles for data modeling in DynamoDB and additional resources for further learning.

Insights

  • The choice of partition key is critical for data distribution and avoiding hotspots, with UUIDs being a preferred option for their randomness and high cardinality.
  • Vertical partitioning can significantly reduce costs by allowing for updates to only the necessary parts of an item, rather than the entire item.
  • Sparse secondary indexes are useful for filtering data efficiently, as they only include items that meet certain criteria, reducing storage and read costs.
  • Global Secondary Indexes (GSIs) should be designed with high cardinality to avoid write contention and throttling.
  • The session highlighted the importance of aligning data modeling with access patterns to optimize performance and cost.
  • The presenters suggested using tools like NoSQL Workbench and resources like the DynamoDB book by Alex DeBrie for deeper understanding and practical application of the concepts discussed.