AWS Certified Solutions Architect - Professional 2020

Sign Up Free or Log In to participate!

Question on dynamodb table design

Ref the question ‘You are designing a DynamoDB datastore to record electric meter readings from millions of homes once a week. We share on our website weekly live electric consumption charts based of this data so the week must be part of the primary key. How might we design our datastore for optimal efficiency?’

A table per week is suggested as the right answer. However, a single table partitioned by meterID (or something) and date as the range key would give what we need, and generally more flexibility running analytics. Is that not a better answer?

1 Answers

Please see the documentation link, as this is a Best Practice from AWS.

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-time-series.html

"General design principles in Amazon DynamoDB recommend that you keep the number of tables you use to a minimum. For most applications, a single table is all you need. However, for time series data, you can often best handle it by using one table per application per period."

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?