Find greatly enlighten the design of this data sheet

Category: MS-SQL Server -> Foundation Classes Author: ouranyun Date: 2011-02-01 22:44:19
 
ouranyun
2011-02-01 22:44:19

brother designed a similar kind of stuff online exam designed encountered multiple choice answer when designing the two tables, although able to meet demand, and always felt not very consistent with the natural logic, not the best program, requesting greatly enlighten

questions table: Exm_Questions
QuestionID title number, since the growth
QustionBody stem
LibraryID corresponding Exam Number
QuestionDate Input time
ModeID ID such as fill in the blank questions, selection, quiz questions

list: Exm_QuestionOption
OptionID title branched growth since the number
OptionMark Question branch tag as: choice of A, B, C, D; fill-in (1), (2), (3) support such
OptionText title text portion of
ModeID options such as multiple choice questions expenditure pattern, fill-in the corresponding title waited in vain
QuestionID trumpets

current demand is mainly multiple choice is too much trouble,
1) more Options Number of uncertain
2) there is an option may select "Other", select "Other" also need to fill out the "Other" blank
specific content ; what foods such as ice cream diet A B C fruit meal meat E D Other __________
3) administrator needs to answer multi-select each option for statistics, as described in Section A, x xx title chosen people, the total number of xx%.

So I designed a record answer records table

Schedule Exm_PaperDetails
papers papers recording a subject
SerialID No.
QuestionID from growth in the corresponding exam questions
SectionID which the subject belongs to a large Question
Sort order

answer list: Exm_PaperAnswer
RecordID growth since the corresponding record number
SerialID Question No.
AnswerOption questions choices, A selected on the record as "A", choose the "AB" to insert two records were "A", "B"
AnswerText answer fill in the blank text selection chose to fill gaps. " Other "write the text after the answer subjective questions such
SectionID correspond big question Question
ClientID corresponding Also a record number of records examination staff

multiple choice question now is which records will be more than one option in Exm_PaperAnser insert more than one record (with, separated by a field record can not be achieved statistics), and OptionText and OptionMark records answer literal meaning varies according to the kinds of questions, always feel not right.

think the best solution is not to say a lot, do not know whether there are clear .

request greatly criticized this design, can point out a better solution better.
grateful.
qidae
2011-02-01 23:08:30
generally read, I feel pretty good, relatively reasonable table design is the relationship is not very clear, the lack of a point and the necessary triggers on a table view, such a basic question, when a topic when the table data input Exm_Questions forget if due to negligence the basic constraints or other factors that lead to failure should set the trigger input rollback, or auto ID segment QuestionID ID will not be continuous, and with just a simple little problem, there is much to consider these
SQL to do the back-end database, you should use a WINDOWS application to call the database, then your system will be more perfect exam.
Thanks in advance ~ ~ ~ ~ ~
tt6301567
2011-02-01 23:28:56
generally looked down, I feel pretty Yes, the table design is reasonable, that is, the relationship is less clear, the lack of a point and the necessary triggers on a table view, such a basic question, when a subject when the data input Exm_Questions table if inadvertently forgotten the basic constraints or other factors that lead to failure should set the trigger input rollback, or auto ID segment QuestionID ID will not be continuous, and with just a simple little question, you should consider these
There is much to do SQL back-end database, you should use a WINDOWS application to call the database, then your system will be more perfect exam.
Thanks in advance ~ ~ ~ ~ ~
changlm4874175
2011-02-02 00:07:32
Sorry, mostly made of.
nuzhou
2011-02-02 00:30:33
multiple-choice answers can be coded to indicate
as A 1000, B 0100, C 0010, D 0001, AB 1100, etc.
Each answer is followed by the "other" option to fill in the content, when there select "Other" option when it is statistical.