I’m looking to create a database (using Django) where:
- A user uploads photos.
- A user upvotes/downvotes photos of other users.
I came up with this ER diagram:
My questions are:
- Is a vote better as an entity or as an attribute of the photo?
- If a vote should remain an entity, how do I show in its attributes that the primary key of the vote is the combined foreign keys of the user and the photo?
Any constructive comments/recommendations are also welcome.