Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8718731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:37:03+00:00 2026-06-13T06:37:03+00:00

I am trying to find the best solution for creating a survey application which

  • 0

I am trying to find the best solution for creating a survey application which allows the users to choose their questions within an administrator section.

If I have a front end web page which the questions are asked, and when they answer them, I save the answers in a database. Now this is great if the columns in my “FinishedSurvey” table match the questions. However, what I want is to be able to allow the users to choose their questions so that when they log on, they see their questions and when submitting, those answers are saved alongside those questions for future retrievable.

This question moves into any application where you require people to be allowed to change what is store in a database without you knowing.

I have done things like this in the past where I have say 20 int columns and 20 varchar columns with generic names which a config file maps to a particular customers configuration. Say varCharColumn1 is mapped to “What is your name?”. However this is messy, not really expandable, and is wasting storage.

This application will have thousands of users, all asking different questions with different methods of input and different formats of answers. Some may require drop downs with set answers, calendars, free text with 10 characters, free text with 1000 characters, and numbers.

There is probably a simple answer or approach, or even a technology I am not famiular with to do just this, however I can’t really think of an easy way.

This particular application is a ASP.NET 4.0 web site with MsSQL database.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T06:37:04+00:00Added an answer on June 13, 2026 at 6:37 am

    columns […] match the questions […] 20 int columns and 20 varchar columns […] However this is messy, not really expandable, and is wasting storage.

    You’re right. Pick up a book on database normalization. What if someone wants a survey with a hundred questions? Will you say “We can’t”, or will you roll out an update that creates a hundred columns?

    I think I’d do it like this: say you have a Questionnaire table, at the top level:

    ID | Description
    -------------------------
     1 | 'Test questionnaire'
    

    Create a table consisting of Questions, for example:

    ID | QuestionnaireID | Question        | ( Other options like 'IsMandatory')
    ----------------------------------------------------------------------------
     1 |               1 | 'Test question' | 
    

    Then create an Answers table:

    ID | QuestionID | Answer          | IsUserSpecified
    ---------------------------------------------------
     1 |          1 | 'Test answer 1' |               0 
     2 |          1 | 'Test answer 2' |               0
     3 |          1 | 'Other...'      |               1
    

    Then create a Response table containing answered questions:

    ID | UserID | AnswerID | AnswerValue
    ----------------------------------------------------------------------------
     1 |      1 |        1 | 
     1 |      2 |        3 | 'I was entered by the user'
    

    And you’re done. You let users enter an AnswerValue like when they can enter their own value, like the “Other…” answer.

    Unfortunately, this does not deal with the typedness of the given answers. I think, but I haven’t had the time to think and/or test it through, you can add typed columns to the Answers and Response tables (like VarCharValue, DateTimeValue, IntValue …). You’ll then have to register with the Answers table what type of value can be entered for answers and fill/read the appropriate column. That design still smells, though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to find the best solution: I have a usermodel and the user
I'm trying to find the best way to design my application and precisely my
I am just trying to find out the best solution how to make a
I have a slight issue I'm trying to find the best solution for. I
I'm trying to find best way to create extensible and autoupdating application. Scenario: many
I'm trying to find a best solution to save from performance, memory usage etc.
I have an example log that i am trying to find the best solution
I'm trying to find the best algorithmic solution to the following problem. It's a
I am trying to find the best solution to prevent us to allocate too
I'm trying to find the best solution for nonblocking IO via stdin/stdout with the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.