I am trying to create a table in SQLAlchemy which would connect a movie and a category and give it a score (The Shining in the category Thriller might have a score of 700 whilst The Shining in the category Drama might have a score of 540 etc).
This means that the table will include many references to The Shining and many references to Thriller but only one case where it is the combination of The Shining and Thriller which would also include the score of 700. This picture explains it well.
Category and Movie are classes of their own.
So searching for an answer I found that I could have multiple primary keys but that wouldn't work in this case since primary keys have to be unique and the Movie ID and Category ID aren't unique.
I found the word "Composite Key" which sounds like what I'm looking for but demonstrated in SQLAlchemy it doesn't seem to do the same thing as I thought it would.
How would I go about making a table that does what I'm looking for? AKA the "Category Movie Scores" from the picture? And the reason I'm not just creating a regular ID that would serve as a primary key is that it would never ever be used, I'm only everu querying this table with the Movie and Category ID's.
Thanks in advance!