D
D
DmitriyEduardovich2020-07-29 14:04:26
MySQL
DmitriyEduardovich, 2020-07-29 14:04:26

How to create tables, store data?

We were given the task to write a small testing service.

There is a tests table, it stores testing topics, there is a questions table, it stores a question and a link to the correct answer, an answers table, it stores answers to questions. tests is related to questions, questions is related to answers.

What is the best way to store the correct answer to a question? In the table with the question or make a separate table or something else?

What is the best way to store test history? I suppose we need a table test_sessions which will store information about the user, the subject of testing. The test_qna table which stores the record id test_sessions, the question, the answer selected by the user, and the "correct answer".
Or is there a better way to store the history of the tests?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kocherman, 2020-07-29
@DmitriyEduardovich

Here are ready-made solutions:
1) [python] https://github.com/FOSSEE/online_test
documentation here: https://yaksh.readthedocs.io/en/latest/
2) [php] https://github.com /sunnygkp10/Online-Exam-System-
database schema here: https://github.com/sunnygkp10/Online-Exam-System-/...
3) [nodejs] https://github.com/annuay/online- objective-examina...
4) [java] https://github.com/alibaba/online-test-platform
5) [php] https://github.com/projectworldsofficial/online-ex...
(a clone of that the same as the second option: they have the same databases, the implementations are slightly different).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question