Relationship mapping with question entity and answer entity(multiple entity)

0
i am trying to create a quiz app. i have question entity and answer entity of list of options(answers) , a user_answer entity where users answer will be stored and result entity where correct answers are stored.What should be the relationship between this entity and how can i do it?
asked
1 answers
0

The answers the user provide can be related to the defined answers.

So there is a 1 to many relation from the user answers, this way the answer can have multiple user answers associated.

The result is now available in these 2 entities. If you get all the answers for a question that are defined as correct and you retrieve a list of correct answers that have an associated user answer, you can simply count the 2 lists to validate the result for a user. The user need to be either stored in the user answer or better associate the user with the user answer.

answered