Understanding DynamoDB data modeling
If you have ever designed a relational database, then you are familiar with schemas such as star schemas. Each table needs to have a specified attribute and if that attribute has no value, then a null is kept in its place.
DynamoDB uses partitions. These partitions can be either hot partitions or cold partitions.
Every item in DynamoDB requires at least one attribute, and that is the partition key. This partition key is used by Dynamo to hash your data and place it in memory. To achieve optimal performance in DynamoDB, we need to choose a partition key that allows DynamoDB to spread its searches across the disk and not let a single partition get too hot.
This is best demonstrated with a bad example of a partition key, such as date. If you are trying to gather lots of data all from the same date, then the hash value of the single date will be stored in the same partition. Different dates may be stored across different partitions since...