多选queston网站的数据库设计 [英] Database design for a multiple choice queston website

查看:53
本文介绍了多选queston网站的数据库设计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何为MCQ网站创建数据库,以便我有3个部分的物理化学和数学,并且每个部分都有不同的子主题。我想存储每个主题的最少20个问题。我想以这样的方式存储问题,选择和纠正ans,使得子主题的每个问题都存储在同一个表中,但不同部分的子部分的问题存储在不同的部分中。



我尝试了什么:



我创建了3个表格用于部分,1个表示问题和一个用于选择,但我难以存储单个子部分的问题

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

推荐答案

这可以帮助您启动:
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

数据库设计是一个迭代过程。最终的设计将取决于用户的要求和其他考虑因素,如数据库操作的简易性。

如果您不熟悉数据库设计,那么您应该学习:

1 。数据库设计简介 [ ^ ]

2. 数据库规范化中的1NF,2NF,3NF和BCNF [ ^ ]

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[^]


引用:

如何为MCQ网站创建数据库

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我很难存储个别小节的问题

i am having difficulty in storing questions for individual sub-section



这个和没有什么是相同的。


This and nothing is the same.


这篇关于多选queston网站的数据库设计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆