我有一个项目来创建一个 asp.net mvc 站点来生成一个测验。
这是规范:
我能想到的最简单的模型如下:
public class Problem
{
public int ProblemId { get; set; }
public string Question { get; set; }
public string A { get; set; }
public string B { get; set; }
public string C { get; set; }
public string D { get; set; }
public string E { get; set; }
}
我不确定它是否好。
你能给我一个更好的设计建议吗?
最佳答案
属性 A 到 E?不,谢谢!我会按如下方式布置我的表格:
Quiz (int QuizId, ...)
Problem (int ProblemId, int QuizId, string Question)
Answer (int AnswerId, int ProblemId, int Index, string Answer)
字段名称应该是不言自明的(索引是单个问题答案的排序索引,如果它们的顺序很重要)
关于database-design - 多项选择测验引擎的数据库模式的良好设计是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4894241/