key value store - DynamoDB Schema Design - Order Model -


i modeling simple application use dynamodb storage. need store order ecommerce website. possible query using order_id , user email.

looking @ dynamodb documentation, think best approach user order_id (most of queries made on index) primary key (partition key).

and email? secondary index, bit lost. best approach?

it looks global secondary index on email attribute solve problem:

  • when need lookup order_id, use getitem operation , specify order_id primary key

  • when need lookup email, use query api on gsi , specify email partition key.

gsi have independent read capacity units - since said use order_id of time, provision more rcu main table gsi.

reference:


Comments

Popular posts from this blog

PHP while loop dynamic rowspan -

android - How to read a column value in parse.com without accessing an object or a pointer -

timer - Java TimerTask cancel -