Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
btx
Starting Member
1 Post |
Posted - 2009-06-15 : 11:36:35
|
I would like to design a simple questionnaire system, I don't know whether the following DB design is suitable, please give me some comments. THX!--------------------------Q: What pet do you like most?A. Dog B. Cat C. Fish D. RabbitQ: What is your name?A: Peter (input by the user)--------------------------Table 1: questionairequestionaireID (int) [pk]title varchar(100)Table 2: questionsquestionID (int) [pk]questionaireID (int) [relationship with questionaire.questionaireID]title varchar(255)Table 3: answersanswerID (int) [pk]questionID (int) [relationship with questions.questionID]answer varchar(255)Table 4: userAnswersuserAnswerID (int) [pk]questionID int [relationship with questions.questionID]answer varchar(255)userID intresponseDate datetime |
|
SQLRatankalwa
Starting Member
42 Posts |
Posted - 2009-06-16 : 08:49:26
|
HiYou have not specified whether there would be an option for the user to answer more than one question.The only change would be In the userAnswers table, you can put the AnswerId instead of storing the Answer.Ratan KalwaSQL Server Professionals User Grouphttp://www.revalsys.com |
|
|
|
|
|