Sandeep Dixiton Stack Overflow • Recommends
On “Choice PK and SK in DynamoDB”
DynamoDb is a very different world from the SQL world. There are trade-offs for getting unlimited scalability.
Do not rush to model your Db if the following appears absurd or new to you. Take your time to read more to understand.
DynamoDb Tables have Partitions Keys which are used to automatically determine which physical partition data will be stored in. Do not mistake these with Primary Keys (also called PK). Partitions Keys are not generally unique.
Single table is supposed to have store multiple entities (unlike SQL world). For example, user profile and user orders can be stored like this.
PK: User#1 , SK: PROFILE# , username:dixitsandeep , addresses:[]
PK : User#1 , SK: ORDER#…