I have an idea of how to fix this but I was wondering what the best way to go about this.
So one Question can have multiple Answers Question and Answers can have points A user is only allowed to give points per question/answer
Question:
id
title
Answer:
id
question_id
response
Points:
id
user_id
question_id
answer_id
points
So as you can see the problem is the Points table with question_id and answer_id. Now I think I could solve this by having Points_Question table and Points_Answer table, then I could join the tables for total_points. Is this the best solution?