• I have 6 questions and could grow, and since each question has its own comments box that is made visible based on user's response, how will just one comments field in Answer_text table be enough?

    QUESTIONS do not have a comments box associated with them, ANSWERS do.

    Right now, you have one survey consisting of 6 questions. All of these 6 questions may or may not contain additional data provided by the user. This is determined by the answer provided.

    So, right now, you would have:

    One record in the survey table.

    6 records in the questions table.

    When a user completes the survey, you will also have:

    6 records in the answer table

    0 to 6 records in the answer_text table.

    I am missing something? Where you planning on making the answer table a pre-defined set of possible answers? In that case, where were you planning on saving the actual answers?

    There are some gotcha's in that are not taken into consideration in the design.

    A few scenarios to consider:

    If a user answers X to question 2, then skip to question 10.

    If a user answers X to question 2, then X number of additional questions appear that need to be answered.

    A question requires an answer, and an additional set of "sub answers" then appear. This may differ based upon the answer.

    Questions worded like: "Based upon the answer you provided on question 10, would you say that this is A. Important, B.Not Imnportant.

    And so forth.

    Michael L John
    If you assassinate a DBA, would you pull a trigger?
    To properly post on a forum:
    http://www.sqlservercentral.com/articles/61537/