我只是想要一些建议,在数据库中创建“问题”表时,我需要存储每个问题的问题编号还是不需要,因为每个问题都有自己唯一的 ID,这要归功于自动增量,当学生参加考试,每个学生的问题将随机出现,因此他们无法复制答案。
换句话说,问题表应该是这样的(示例 1):
QuestionId (int 11) auto increment PK //unique identifier for each question
QuestionNo (int 3) //the question number
QuestionContent (varchar 800) //the question itself
AnswerId (int 11) //Foreign key to AnswerId in Answer Table
或者应该是这样的(示例2):
QuestionId (int 11) auto increment PK //unique identifier for each question
QuestionContent (varchar 800) //the question itself
AnswerId (int 11) //Foreign key to AnswerId in Answer Table