N
N
Nikolay2015-05-16 14:14:19
MySQL
Nikolay, 2015-05-16 14:14:19

What database structure to choose for storing test tasks?

I will need to parse files with test tasks and save them to the database. Each test will have the following parameters:

  • id Number,
  • question,
  • answers (3 pcs),
  • correct answer (1pc),
  • question topic,
  • source (only two sources),
  • source year,
  • the specialty to which the question relates,
  • question language.

What is the best structure to choose? Of course, you can do everything in one table, but will it be right?
What literature can be read about the organization of the data structure in the database?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Roman Kitaev, 2015-05-16
@deliro

Answers to another table (suddenly there will be more of them over time?), The correct answer is the id of the answer in another table. Everything.

M
Maxim Gavrilov, 2015-05-16
@thestump

At first glance, 3 tables will suffice: questions, questions asked, answers provided.
Although I would advise you to contact a database architect with a development task, and train yourself on something less critical.

R
Rsa97, 2015-05-16
@Rsa97

Question table: test number, question number, topic ID, source ID 1, source ID 2, specialty ID, language code ; primary key - (test number, question number).
Answer table: ID, test number, question number, answer text, sign of the correct answer.
Table of topics, table of sources, table of specialties.

R
Roman_ Outside, 2015-05-16
@new_Roman

Christopher Date, book - An Introduction to Database Systems, rutracker.org/forum/viewtopic.php?t=1714020 might help. This is a fundamental work on databases.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question