I need to make a scheme for an database. My problem is, that I have multiple questions they belong to one exam. That means: One Exam has multiple Questions. I don’t know how I can solve that. I have try to fix it with an table between “tabQuestions” and “tabTest” but I doesn’t seems to be the correct approach.
I have the following tables:
tabTest: ID, Name, FK_Categorie, FK_Questions
tabQuestions: ID, Question, FK_Answer
tabAnswers: ID, Answer, FK_Solution
tabSolution: ID, Solution
Thank you very much for the help!
Luca
You don’t need the
FK_Questionfield in yourtabTest. What you need is aFK_Testfield in yourtabQuestiontable where you store the id of the test the question belongs to.…if I understood you right…?
And if I understood you right, then you should use the same for the rest of the schema too. This means you need a reference in your solutions table where you store the answer the solution belongs to etc.