Hello ,
I have to create a quiz in my web application, that's easy . Issue comes when there are 3 different types of quiz.
Quiz 1 ) -> Objective type.
Quiz 2 ) -> Images and Answer by selecting a lable from Image.
Quiz 3 ) -> Plain text question with answer linked to an existing table.
I am having hard time in creating table structure for answers table. Multiple tables will be needed here for each type of quiz but how do i link them to Answers. So if question is for quiz type 1 then link to Answer table for quiz type 1 so on..
Now i need to create answer table. I know that it will be Bad if i put all the columns in a single table so i have to normalize and create saperate tables for saperate answers.
I don't even need Exact code. just point me in the right direction to create the appropriate structure.
Thanks
What I have tried:
I create Tables for quiz
Create table QuizMaster (Id int identity primary key , QuizName nvarchar(100),IsActive bit , CreatedDate datetime not null default getdate(),ModifiedDate datetime)
Create table Quiz (Id int identity primary Key , QuizType int foreign key references QuizMaster(Id),Title nvarchar(1000), [Description] nvarchar(4000),CreatedDate datetime not null default getdate(), ModifiedDate datetime,IsActive bit )
Create Table QuizQuestions (Id int identity primary key , QuizNo int foreign key references Quiz(Id), Title nvarchar(1000),ImagePath nvarchar(1000),ImageName nvarchar(500))