To develop single-choice topics, multiple-choice topics, right and wrong questions, how to design the database?

problem description

to develop single-choice, multiple-choice, right and wrong questions, how to design the database? How many watches should I design? I can"t figure it out, for example, single selection and multiple selection are of the same type, but how to design the right and wrong questions?

Mar.21,2022

  1. item list:
    | tid | question:TEXT | type:ENUM |
  2. answer table:
    | aid | tid | answer:TEXT | is_correct:BOOL |
The type of

question only affects how the answer is displayed on the page, and the answer only needs to record whether it belongs to the question and whether it is the correct answer.

with this structure, the is_correct of multiple answers can be TRUE , and the same is true for the wrong questions.

Menu