View Poll Results: modeling marketing questionaire

1. You may not vote on this poll
  • 1

    0 0%
  • 2

    1 100.00%
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2002

    modeling marketing questrionaire


    I need to model a typical questionaire, like:
    Your name, email , gender, age range, education level, salary range,
    doyou have tv cable, do you have pc at home...

    I need to leave it flexible enough so that new questions can
    be easily added as well as old ones deleted.
    It should also be easy to retrieve customer data that
    answered let say yes to having pc cable...

    Is there anyone who modeled these questions and answers
    already and how?

    I have some ideas but...
    All suggestions and comments are welcome.


  2. #2
    Join Date
    Mar 2001
    Lexington, KY
    I would think you'd need a couple tables:
    questionnaire( questionnaire_id, title, etc. )
    question_type( question_type_id, title )
    question( question_id, question_type_id fk, questionnaire_id fk, title )
    question_result( question_id, user_id, result )

    If you were doing this as a web page I'd add an HTML column in question_type so that you can avoid "if( $question_type[title] == "yesno" ) then" sorts of situations.

    I am assuming questions in questionnaires are pretty unique (e.g. you wouldn't have two questionnaires with 'how much do you make'), if you do it would make more sense to change things around a bit.

    If you can explain your data requirements a bit more then we can have an easier time helping, although typically I've seen it broken into the same component parts:
    a question
    a user response to the question
    a questionnaire (set of questions)


  3. #3
    Join Date
    May 2002

    Thanks for the reply, btw this was not supposed to be a poll
    but a new thread - sorry.
    Your comments are of great help and in line with my thoughts

    Would you please elaborate on:
    If you were doing this as a web page I'd add an HTML column in question_type so that you can avoid "if( $question_type[title] == "yesno" ) then" sorts of situations.

    I did not understand the meaning/purpose of HTML column ...and that
    would be the most helpful because almost all our questions are
    with yes/no answers in a web based app collecting consumer

    At the present time we have a monster table called consumer
    wit columns like name, email...but also a bunch of columns
    that are actual questions to consumers...l
    do you have service1 is a colum name populated with the answer (yes/no)
    do you have service 2 ( column_name)
    do you own cable? (column_name ) ...

    Adding new 'columns' (questions) to this table is something
    I would like to avoid...

    thanks again

  4. #4
    Join Date
    Dec 2001
    Delhi/Bangalore, India
    If you have any questions that require the user to ENTER some text, and you'll be storing that text as the result, you will need to display the text-box in your output HTML. Similarly, for a yes/no question, you would need radio-buttons. For a multiple-choice question, you will need to have check-boxes.

    Either use the question_type info to differentiate, and in your backend script, use if-statements to decide what type of HTML components to display. Or, use another column which would contain the HTML code for displaying the options; or some other identifier which you will easily replace with another hashed set of HTML tags.

    PS: If your questionaire contains any multiple choice options (like..."Choose which credit card you use: Master Card, Visa, Amex, Others"), then you need to store these options somewhere too.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts