Understanding AWS DynamoDB Data Structure

Asked 2 years ago, Updated 2 years ago, 103 views

I'm thinking of creating an app with image posting and image ranking functions on ios.So I am using AWS Dynamo DB, but I was wondering what to do with the structure of the database, so I asked you a question.
Features include
·Posting images
·Popularity ranking (number of likes)
·New order
is available.

An item is generated for each post, as follows:
·userid
·username
·imageURL
·Like
·date

What should I do with the database structure to get the dynamoDB that is sorted by popularity ranking and new order?
I looked at the reference and it seemed that I could not sort anything other than the hash key.
Is it possible that the ranking cannot be done on dynamoDB?

ios swift aws mongodb

2022-09-30 21:14

1 Answers

If you create a Global or Local Secondary Index, you can sort and retrieve data by its attributes.

However, if the conditions vary, it may be better to reconsider the processing content and data structure, or to set up another dedicated table.


2022-09-30 21:14

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.