问卷数据库设计?
我需要创建一个简单的问卷 ER 图。这将是健康风险评估问卷并评估患者的健康风险。每个元组将包括调查表 ID、患者 ID、医生 ID 和每个问题的答案,如答案 1、答案 2...等。每个答案也可以是 Y/N 、复选框或下拉列表。我需要一页一页地考虑调查问卷。它可以是三页。请尽快帮助我。
I need to create a simple questionnaire ER diagram. It is gonna be Health Risk assessment questionnaire and assess health risk of a patient. Each tuple will include questionnaireID, PatientID, DoctorID and Answers of each question like answer1,answer2,...etc. and also each answer can be Y/N , checkbox or dropdown list. I need to consider questionnaire page by page. It can be three pages.Please help me asap.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
页面上的组织是视图考虑因素。在设计架构时我不会担心这一点。
您可能有家长/儿童问题(例如,如果性别是男性,则不要询问怀孕问题;如果患者患有癌症,则仅询问癌症问题等)。
调查问卷可能有相关历史记录:可能会根据给定的情况添加或删除问题日期。我会为每个问题添加有效日期和到期日期。
一份调查问卷有一个或多个问题。
一个问题可以有一个或多个候选答案(例如多项选择),但只能有一个给定或选定的答案。
答案可以有一个类型。每种类型都有自己的表,并具有与其类型和问题的外键关系。
决策树/层次结构可能比关系表更好。这对于 XML 和 NoSQL 来说可能是一个很好的用途。
这些可能会帮助您设计架构。祝你好运。
The organization on the page is a view consideration. I wouldn't worry about that in designing the schema.
You might have parent/child questions (e.g., don't ask pregnancy questions if gender is male; only ask cancer questions if the patient has had cancer, etc.)
A questionnaire might have associated history: Questions might be added or removed on given dates. I'd add effective and expiration dates for each question.
A questionnaire has one ore more questions.
A question can have one or more candidate answers (e.g. multiple choice), but only one given or selected answer.
An answer can have a type. Each type will have its own table, with a foreign key relationship to its type and question.
A decision tree/hierarchy might work better than relational tables. This could be a good use for XML and NoSQL.
These might help you design your schema. Good luck.