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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:57:15+00:00 2026-06-11T19:57:15+00:00

We have to make a ballot system that makes users vote for various candidates

  • 0

We have to make a ballot system that makes users vote for various candidates on different positions. There’s a login for voters. How do you store a vote of one voter and then get that vote added to the previous votes? The only possible way is to store every vote on a database right? But what would the structure of the database look like? And how do you count it?

edit:
The voting system doesnt only have one group of candidates to vote. It has mayor, vice-mayor, senator, etc. There are too many. that’s why I’m confused. If only it was just a voting system of a president, it would be easier. So if I have a table for the voter, with a column of his/her voted candidate, it’s not possible since the voter votes for many candidates.

  • 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-11T19:57:16+00:00Added an answer on June 11, 2026 at 7:57 pm

    A better way would be to have a different table to store Votes. And that table will have two attributes (VoterId, CandidateId)
    And you can fetch the Vote Count if you are allowing multiple votes from this table..

    But it would be better to make VoterId a Primary key in this table.. To avoid multiple voting

    CandidateType: – (TypeId(PK), typeName, maxVotePerVoterForThisType)

    Voter Table: – (voterId(PK), voterName, otherInfo)

    Candidate Table: – (candidateId(PK), candidateName, constituency,
    otherInfo, TypeId(FK))

    Votes:- (voterId(PK, FK), TypeId(PK, FK), candidateId(FK))

    *EDIT:- Schema edited with changed requirement in original post

    *EDIT: – Added a field in CandidateType table to allow multiple votes.(E.g.: Now a voter can vote for 10 Senators, if maxVotePerVoter for this type is set to 10..)

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

Sidebar

Related Questions

I have make a script. That set li items on different positions on the
I have make a messaging system in which user can send messages to each
Using this sample : I have make my own Fragment that holds tabhost and
I have to make a page that look like painting below, but: field 1
I have to make a conditional in ash, that depends on result of two
Following is the code snippet that I have: // Make Auto release pool NSAutoreleasePool
Is there a way to have make display the line number where it declares
I have implement Form Authentication <location path=Admin> <system.web> <authorization> <deny users=?/> <allow roles=Admin />
I have make an application. In this application client need that when user download
I have to make some automatic work with site. There is a form and

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.