I am making an online exam practice website in which user can give test and practice exams . While practicing exam user can view correct answer and it's explanation. It is easy to store mathematics questions in database but how to store mathematical expressions like fraction numbers, variable containing powers, differentiation, Integration, etc.
What I have tried:
here is the table of questions :-
CREATE TABLE [dbo].[Questions] (
[QuestionId] INT IDENTITY (1, 1) NOT NULL,
[SectionId] INT NOT NULL,
[PassageId] INT NULL,
[Question] VARCHAR (MAX) NOT NULL,
[Option1] VARCHAR (MAX) NOT NULL,
[Option2] VARCHAR (MAX) NOT NULL,
[Option3] VARCHAR (MAX) NOT NULL,
[Option4] VARCHAR (MAX) NOT NULL,
[CorrectAns] INT NOT NULL,
[Description] VARCHAR (MAX) NULL,
PRIMARY KEY CLUSTERED ([QuestionId] ASC),
CONSTRAINT [FK_Questions_Section] FOREIGN KEY ([SectionId]) REFERENCES [dbo].[Section] ([SectionId])
);