I am designing database for a quiz, and I am stuck. I do not know how to do it.
Here is the relevant information:
Player answers 10 questions.
Each question has 3 answers. Only one answer is correct, other 2 are wrong.
I need help with database design.
What I have tried:
Here is my design:
Table Players
:
ID bigint (primary key, identity)
Name nvarchar(MAX)
Table Questions
:
ID bigint (primary key, identity)
TextOfTheQuestion nvarchar(MAX)
Table Answers
:
ID bigint (primary key, identity)
TextOfTheAnswer nvarchar(MAX)
QuestionID bigint (foreign key to Questions.ID)
isCorrectAnswer bit
Table PlayerChoices
:
PlayerID bigint (primary key, foreign key to Players.ID)
AnswerID bigint (primary key, foreign key to Answers.ID)