Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Questions and Responses Tables

Status
Not open for further replies.

flipper1067

Programmer
Apr 27, 2006
2
US
I have a small questionnaire of our paper aplication that I have in my DB. I have set up tables for the questions, the responses and also the responses to the subquestions to some of the questions. Some of the responses to the subquestions are "other". If it is other, i need to set up another table so the user can type in the response to other. I am not sure how to do this.

I have a table for questions, one for responses, one for sub questions and one for their responses to those. I need another table for responses to the sub questions if they choose other.
 
Hiya,

This seems logical, but, it depends on your current model/schema:

[tt]
tblUser tblQuestion tblQuestions tblResponse
pk <--| pk <--| pk <--| pk
name |-->>user_fk |-->>question_fk |-->> questions_fk
topic question response
datetime datetime
[/tt]


A User asks a question, the topic is stored in tblQuestion, which is really a link-table to ALL subsequent questions (including the original). Each question has a response or responses stored in tblResponses.

Hope this gives you an idea.

ATB

Darrylle


Never argue with an idiot, he'll bring you down to his level - then beat you with experience. darrylles@yahoo.co.uk
 
I figured it out to add another table for the subquestions responses, "other":

tblPart3Other
Part3OtherID - PK
ApplicantResponseID (FK)and PK
AppliantOtherAnswer-Text field

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top