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.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e561f9-44b14.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e561f9-44b14.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?