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 8628939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:40:53+00:00 2026-06-12T08:40:53+00:00

In my system a manager create a poll and publish it to the world

  • 0

In my system a manager create a poll and publish it to the world so users which have the link to the poll can answer it.

There is some question which designed to receive multiple answers, so user can choose multiple distract in one response.

The response table structure in the DB

  • ID
  • ActivityID – the poll ID
  • Value – the district value
  • TimeResponse

In the database i am currently saving each response separately.

I will give you an example
Lets say there is 4 district in a poll (a,b,c,d)
User choose the following district (a,b,c)

The response table will look like this:

   ID       ActivityID      Value    TimeResponse
    1           234            a        01/01/2012 
    2           234            b        01/01/2012
    3           234            c        01/01/2012

So if i try to count the ID i will get the number 3 which represent the number of district were answered is a given poll.

BUT i need the number of responses per user in a given poll, so i need somehow to combine those two…

Until now i thought about the following solutions but neither of them is good.

  • the first solution was to add a column of the user’s IP, but sometimes i cant get the user’s IP.
  • the second solution was to add a column of the user’s sessionID using the sessionIDManager, but if the user answer twice (2 response) it will store the same session ID.

FYI, the user which answer the poll is anonymous.

And also one of the system requirement is to allow a user to answer a poll several times

  • 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-12T08:40:55+00:00Added an answer on June 12, 2026 at 8:40 am

    There are two approaches I can see.

    One would be to generate a UUID every time the user answers the poll. Create a column within the database, such as AnswerID and use this same UUID when you’re creating the rows for each of their responses. In C#, you can create a UUID with Guid.NewGuid(). You could then count the number of responses by querying for the distinct AnswerID values.

    The second approach would be to use a single row for each set of answers to a given question. For example, if the user answered A, B and C, you’d store the response as “A/B/C”. This would make it harder to query for the total number of a certain answer, though some database systems might make this easier (for example, PostgreSQL has an indexable array type).

    Hope this helps!

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

Sidebar

Related Questions

I'm writing a particle system manager with SlimDX/D3D11, and I'm finding some problems with
Let's say I want to make a simple project tracking system. A manager can
We have a system that uses sp_getapplock to create an exclusive mutex any time
In the system I am building user CAN NOT register them selves. The users
I'm developing a clipboard manager (which can be seen here: http://flamefusion.net/software/shapeshifter ). However, I
I create some managed threads inside an asp.net application ( System.Threading.Thread ). Each thread
What I currently have I'm currently trying to create a little download manager in
I have a system in which I need bidirectional communication betwen the client and
I've written a C# application which uses System.Diagnostics.Process class to create a process, using
I have create a restful service which returning a List an entity type: [AspNetCompatibilityRequirements(RequirementsMode

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.