I have the following two items which I need to store in dynamodb
- Artists
- Songs
The artists have an ID (unique for artists), name and gender. The Songs have an ID (unique for songs), title, genre, artist and rating.
How should I model this in DynamoDB?.
I was thinking about this: ID as primary key and having a sort key which contains artist or song so they are distinguished. Is this a good choice? In examples I find I see more variety in the sort key.
What about the field artist in song items? Should I just point to the ID of the artist?
Update: I have many common access patterns. I can probably solve it by creating some indexes but still I have to choose for a good PK/SK:
get songs based on title
get songs based on rating
get songs based on genre
get songs based on artist
get artist based on rating
get artist based on gender
get artist based on name
Thanks