4

I have a list of items. Each item is attached to several urls and each url has a score number. So I have something like this :

enter image description here

How should I organise this in dynamoDB? How should I format my Json file to update my data?

Right now I'm using the first item column as a "partition key" and AttributeType as a number. I don't know how should I organise the rest. Maybe something like this : A { stuff : { URL : value, URL: value, URL: value} }. But with this structure I've hard time to update my table and I don't have experiences with this. I don't know the best practises, and I don't find any tutorial...

Thanks!

asked May 12, 2016 at 2:20
0

1 Answer 1

1

depending on how you want to fetch the data. If you want to get all by item, then item as a primary key is a great choice. If you want to filter by item and url then i would add primary key Item and sort key url. If you want to have url and search for the item by url, i would add url as primary key and url as sort key. If you want to be able to do both, i would add primary key for item, sort key for url and then add new GSI with primary key url and sort key item.

I learned a lot about this from this conference: https://www.youtube.com/watch?v=jzeKPKpucS0 recommended.

answered Jul 16, 2018 at 11:06

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.