Anyone have a good example of using @dynamodb with a single table and multiple entities? Having a hard time finding a good example. Most sample apps don't seem to use one table as recommended by #AWS as best practice.
-
-
For example, this video is spectacular, but it uses multiple tables for all of the application examples.https://www.youtube.com/watch?v=tDqLwzQEOmM …
1 reply 0 retweets 0 likesShow this thread -
Even the sample apps in the docs have multiple tables. https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/SampleData.CreateTables.html#SampleData.CreateTables1 …
1 reply 0 retweets 0 likesShow this thread -
Replying to @danbucholtz
Check out https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-adjacency-graphs.html … and https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-modeling-nosql-B.html …
3 replies 1 retweet 0 likes -
Replying to @southpolesteve
The part that is confusing to me is what you should one make the primary key of a top level entity (meaning no parent)? Do you just hard-code it in code? Children are easy since keys are derived largely from parent or are searchable.
1 reply 0 retweets 0 likes -
Replying to @danbucholtz
Not sure I understand. Our lib did incrementing integers. Something like UUID prob makes more sense.
2 replies 0 retweets 0 likes -
Replying to @southpolesteve
So let's say I need to load all users. If I make the partition key a guid, I am not sure I can search for all of the users without doing a full table scan (which is slow). I think for top level entities maybe you want to make partition key fixed
1 reply 0 retweets 0 likes
This is where you make a global secondary index on the sort key. So to get all users you query the secondary index for things that start with "user"
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.