If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Student feedback survey database design

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-09-07, 12:53
laura-lightning laura-lightning is offline
Registered User
 
Join Date: Dec 2007
Posts: 2
Student feedback survey database design

Hi,

I need to create a web fronted database to collate info from students and put them into a db.
I have my questions, some Y/N answers and some text.
So far I know I will need these tables:

Table: Survey
SurveyID
SurveyName

Table: Questions
QuestionID
QuestionText
SurveyID

Table: Answers
AnswerID
QuestionID
AnswerYN
UserID

Table: Users
UserID
Username

I'm just not sure what the relationships will be. Which ones are are one-many and such?

Any help would be greatly appreciated.
Reply With Quote
  #2 (permalink)  
Old 12-09-07, 23:32
jezemine jezemine is offline
another indirection layer
 
Join Date: May 2004
Location: Seattle
Posts: 1,312
can a user answer the same question more than once? if not you should remove Answers.AnswerID column, and make QuestionID,UserID a composite PK of that table. Having a separate AnswerID column would allow dupes on the QuestionID,UserID combination, but perhaps that's appropriate. depends on your reqs.

can questions be shared between surveys? if so you might think about a SurveyQuestion table that sits between Survey and Question. otherwise you'd have the same question duped in the Question table.

you might also add a datetime to Answers so you know when a particular user answered a question.

all questions have only true/false answers? my life is not that simple...
__________________
elsasoft.org
Reply With Quote
  #3 (permalink)  
Old 12-10-07, 04:11
laura-lightning laura-lightning is offline
Registered User
 
Join Date: Dec 2007
Posts: 2
Okay, truth is I am stuck.

I have 19 questions in total on one survey.
I want to store information about the respondant, but just the name.
I have some questions where there is a text response, a yes/no response and a multiple choice answer.

Please can someone help me with the layout of this db?
Reply With Quote
  #4 (permalink)  
Old 12-10-07, 08:12
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
Quote:
Originally Posted by laura-lightning
I have some questions where there is a text response, a yes/no response and a multiple choice answer.
have a look at this design -- http://databaseanswers.org/data_mode...plex/index.htm
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On