Database Design for Questions and Answers
We have an application at our workplace that does a similar thing. It works by having a table that contains a list of all possible questions like such:
CREATE TABLE QUESTIONS
(
ID INT NOT NULL PRIMARY KEY,
SUMMARY NVARCHAR(64) NOT NULL UNIQUE,
DESCRIPTION NVARCHAR(255) NULL
);
Then you have an ANSWERS and a QUESTIONAIRES table defined using the same structure above. Once you have these two tables you then define a table to hold the list of question/answer possibilties as such:
CREATE TABLE QUESTION_ANSWERS
(
ID INT NOT NULL PRIMARY KEY,
QUESTION INT NOT NULL REFERENCES QUESTIONS(ID),
ANSWER INT NOT NULL REFERENCES ANSWERS(ID)
);
Once you have these you can then create a table to contain the responses as such:
CREATE TABLE RESPONSES
(
QUESTIONAIRE INT NOT NULL REFERENCES QUESTIONAIRES(ID),
RESPONSE INT NOT NULL REFERENCES QUESTION_ANSWERS(ID)
);
This will give you maximum flexibility allowing you to add new questions and answers without having to change your database design frequently. It can get a bit complicated if you need to version the questions/answers but this should give you a good foothold to work from.
I hope this helps you.