2017-08-25 58 views
-1

我在为在线调查设计我的数据库时遇到逻辑问题。我的部分软件包含在一个调查生成器中,用户可以创建问题并添加复选框和单选按钮作为选项。所以每个问题都有一个ID,但是1个问题可以有很多选项。用于多选的数据库图

到目前为止,我只能使用软件,用户可以从确定的选项范围中进行选择,以便我可以收集输入并将其存储在表格的相应列中。然而这对我来说是不同的情况,因为列还没有。我试图找出解决办法,但我已经阻止了几个小时。

+0

这是什么? UML问题或DB设计问题。它几乎都不是两个。 –

+0

1.显示你已有的东西。如果你做了几次尝试,展示所有人。也要更具体地说明你在问什么。最后,这个问题与UML无关。 – Ister

回答

0

通过选项假设你的意思可能答案的一个问题

Question -Tracks the question of the survey 
QID PK 

Answers - Tracks the available answers for a survey item 
AID PK 

QuestionAnswers - Identifies which answers can be used on which questions 
QUID PK 
AID PK 

Users - identifies a person taking a survey 
UID PK 

UserAnswers - Identifes the answers a user has selected for a survey and relates to both users and questionAnswers thus limiting which answers can be used for a question but each row allows the user to select 1-M answers as needed. 
UID PK 
QID PK 
AID PK 
相关问题