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

  • Home
  • SEARCH
  • 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 8703761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:56:21+00:00 2026-06-13T02:56:21+00:00

My goal is a simple polling system where users can create a poll question,

  • 0

My goal is a simple polling system where users can create a poll question, provide the poll with a set of options(answers) and vote on each poll. I’ll provide a simple set of fields I need to collect. Then, I’ll provide my solution. Could you tell me if my solution is acceptable?

Fields required: questionText, date, (poster)userId, options(answers), response, (responder)userID, responseDate

My curent solution:

Table: Polls
Fields: questionID, questionText, date, userID

Table: Options
Fields: optionID, optionText, questionID

Table: Respnoses
Fields: responseID, optionID, userID, responseDate

So to find if a user has responded to a specific poll, I would have to query like this:

SELECT responseID FROM Responses
WHERE userID = [user's id] AND optionID IN(
Select optionID FROM Options
WHERE questionID = [specific questionID])

Does that query make sense too?
Thanks in advance.

  • 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-13T02:56:22+00:00Added an answer on June 13, 2026 at 2:56 am

    This model looks fine to me, as does the query. I’m a fan of JOINs, so I would have structured your select query more like this (not a recommendation, just a clarifying alternative):

    SELECT p.questionText, o.optionText AS selected_answer, r.responseDate, r.userID
    FROM Responses r
        JOIN Options o ON r.optionID = o.optionID
        JOIN Polls p ON o.questionID = p.questionID
    WHERE r.userID = [user ID]
    

    My only thought is that, depending on your needs and how auditable you’ll want this system to be, you may want extra fields such as timestamps on the Options and Polls tables. (A “date_edited” versus “date_created”? In low-stakes contexts this may not be needed.)

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

Sidebar

Related Questions

In Google Analytics I set a Goal that is a simple URL Destination using
I'm learning winforms and I have set myself a simple goal of making a
I have a relatively simple goal: I want to create a Cocoa application which
Is here a way to share System.Web.Caching between IIS applications? The simple goal is:
My goal here is to create a very simple template language. At the moment,
I'm trying to create a simple function to do a status test. Goal is
Our goal is simple for an iPhone app: show a splash page then hide
I think I have a pretty simple goal but cant seem to reach it.
I am trying to achieve a very simple goal, however it does not seem
I'm trying to run exec-maven-plugin 's exec:java goal on a simple two-module project where

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.