S
S
seenotevil2015-06-17 12:41:45
PHP
seenotevil, 2015-06-17 12:41:45

How to properly design a database for a test designer?

Hello, the essence is this, I am writing a test constructor in php, the constructor must support the following types of questions, the choice of one or more correct options, the written version, the correspondence of the answer options, that is, correlate the options from the right column with the options from the left, arrange the sequence in the correct order.
There are two tables of questions and answer options, a problem with the table of options, if the question for choosing one or more options does not arise, but if the question is for compliance, then you need to know what to pull into the right and left columns.
The ideas that I came up with, write the type of question in the table of questions and, depending on this, pull out options for their different tables, or in the tables of options in the questions for correspondence, put a separator between the right and left parts.
There was such an idea to use nosql for such a database, like mongodb.
Ps I hope I explained the situation clearly.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Makarov, 2015-06-17
@seenotevil

About the correspondence of the answer options is not very clear, please elaborate.
About one of several or a written one - you can try this: if the question in the database has only one (!) Answer option, then it is also the correct one, and then, by definition, it makes no sense to show the answer to the user - then the question is written. If the question in the database has several answers, then it makes sense to show them to the user what he has chosen, then the question is to choose the correct options.
Well, or really put a type at the question, and process each type differently, especially since you have questions with left-right columns that are not similar to the previous types.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question