FAQ Database Discussion Community


Database design for voting

database,voting,voting-system
I am implementing a voting feature to allow users to vote for their favourite images. They are able to vote for only 3 images. Nothing more or less. Therefore, I am using checkboxes to do validation for it. I need to store these votes in my database. Here is what...

Algorithm for ranking with a star rating (1-5) like Amazon?

algorithm,amazon,ranking,voting
I'm a CS student doing a report on alternative voting systems. One of the best systems I believe is a ranked vote. For example.. In a presidential election, each president would be ranked 1-5. (IMO the problem with the US system is that only votes for the winner actually count)...

mysql query to check if user voted

mysql,voting,vote
in this case i have posts table : id title description post_votes table: id post_id user_id comments table: id post_id user_id content users table: id username I have a query for my index page (logged users) select `posts`.`id`, `posts`.`title`, `posts`.`description`, COUNT(distinct post_votes.id) AS votes, COUNT(distinct comments.id) AS comments from `posts`...

Ruby-on-Rails Voting Partial Routing

ruby-on-rails,routing,voting
I have a voting feature on my app but can't route back to the same page with the vote applied. I know I have to fill in the link_to methods but my understanding of routing/ruby syntax is a bit limited, so I'm not even sure [post, vote] is correct. I...

cannot update without specific objectId error using Swift and Parse

ios,swift,parse.com,voting,voting-system
im using a gesture recognizer to increment votes in my backend and then using that to update the page and each cell. I am trying to link the image with the objectId as to having a way to update each images votes. issues keep coming up with my updateVote function...