Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
How do I create database for a MCQ website such that I have 3 sections physics chemistry and maths and i have different sub topics from each of the section. I want to store minimum 20 questions of each topics. I want to store the questions, choices and correct ans in such a way that every questions of sub-topics get stored in same table but questions of different section`s sub-section get stored in different one.

What I have tried:

I was creating 3 table one for sections and one for questions and one for the choices but i am having difficulty in storing questions for individual sub-section
Posted
Updated 18-Feb-17 9:42am
Comments
Richard MacCutchan 18-Feb-17 4:31am    
"i am having difficulty"
Sorry, but no one here can guess what that is supposed to mean. Please edit your question and add some proper technical detail.

This may help you to kick-start:
section table   topic table	  question table	  choice table    answer table
section_id	    topic_id      question_id         choice_id	      question_id
section_title   topic_title   question_desc       choice_desc     choice_id
  	            section_id    topic_id	          question_id
Database design is an iterative process. The final design will depends on the user's requirements and other considerations such as the ease of database operations.
If you are new to database design, then you should learn:
1. Introduction to database design[^]
2. 1NF, 2NF, 3NF and BCNF in Database Normalization[^]
 
Share this answer
 
Quote:
How do I create database for a MCQ website

Database design is a vast subject and certainly out of scope of a QA question.
Quote:
i am having difficulty in storing questions for individual sub-section

This and nothing is the same.
 
Share this answer
 
Comments
Member 13008699 19-Feb-17 3:39am    
then pls u suggest what shoud
i do?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900