Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2008

    Question Design question - user created form fields

    I have a personal project that I'm planning to implement, but having difficulty with coming up a good solution to below problem.

    The basic idea is to provide a simple tool for users to collect data from other people ( similar to a survey ).
    Users will be able to create several (up to 20) form fields. I can dynamically create a database table for each user-created form, however this doesn't sound like a good solution.

    What would be the best way to do this? I'm planning to use Postgresql for this project. I don't know much about Amazon's SimpleDB, or Google's BigTable. Can those serve better to my problem?

    Thanks for any help...

  2. #2
    Join Date
    Feb 2004
    One Flump in One Place

    Just have a table of questions, a survery table and a survey_questions table. In the survey table pop in a row for detais about the survey (who's doing it, name of survey etc). In survey_questions two columns - question_id and survey_id. There will be up to 20 rows per survey.

    This is a very basic deign and you might well need more tables eventually but it covers the problem you discuss and no need to dynamically create tables.
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Nov 2004
    out on a limb
    questionaires are realtively easy.. providing your questrions are yes/no, or multiple choice. after all its a simple column 1= quesstion 1 answer, column2.... and so on.

    yes no is effectivley a restricted multiple choice.
    you store the value of the relevant choice int he relevant column

    say 0=No, 1= Yes, 3 = undecided
    or -2 strongly disagree, -1 disagree, 0 neutral / dont care, 1 agree, 2 strongly agree

    the problem is when you ask the users opinion in a free from text box, or your choice allows other (please expand)

    however all is not lost

    you can define a question type, and fromt hat decide what type of control / question layout to present to the interviewee. but that is a lot more complex than a simple questionare

  4. #4
    Join Date
    Oct 2007
    Chicago, IL
    I have a data model for this scenario...will try to post some info later today if I get some free time from meetings

  5. #5
    Join Date
    Apr 2008
    Thank you for the replies.

    @pootle flump I liked your suggestion. It solves my problem. I'll probably end up with a huge table (question_id, answer).

    @healdem Unfortunately, fields can be any type (date, boolean, text etc.)

    @healdem Looking forward to your solution.

Posting Permissions

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