Search code examples
amazon-dynamodb

Advice on equivalent sql query to dynamodb data modelling example


I am interested in using dynamodb for modelling my data for performance. I want to create a database of meeting events. This is an example diagram of data I have modelled based upon what I think dynamodb can do.

Can someone correct me if this is the wrong idea and how best improve this model. See attached diagram: enter image description here


Solution

  • Here is my advice to your proposed data model:

    1. You cannot do a between function on the partition key. If your use-case is to get all events in a given time period, I suggest using an index. I wrote a blog post on the very topic.
    2. Again, this looks like a use-case for an index where group is your partition key.
    3. This is not a good fit for DynamoDB. You cannot index on a map or list type attribute, nor can you do geo lookups.