0

I'm planning on integrating a reasonable ranking/voting system into an existing application.

I'm familiar with how the traditional 5 star rating systems work and know the common pitfalls/problems associated with them therefore was wondering if there is other ways (I've heard of Wilsons, Bayesian etc. but not really sure on how to implement this with the below structure):

  • I'm planning on allowing users to vote on content between 1 to 10 via the contents page.
  • The score and total votes for that content will be displayed on the contents page.
  • I will also be displaying/listing the Top 10 Content so I'd need the method to be fair/realistic and not make a vote of 10 with total votes of 1 to go straight to number 1.

I'm using PHP and MySQL, I have a table for the content (which has a content_id which I guess I can JOIN on).

I'm wondering if you can suggest a way/method which achieves the above, I'd appreciate if you can attach some example PHP code and example MySQL schema so I can better understand it, as I've google'd and may have found potential solutions such as Wilsons and Bayesian...yet they provide a lengthy article with confusing mathematical equations - and mention no way which achieves the above (ie. the score....and implenting the method in PHP/MySQL) or atleast due to there not being any example PHP/MySQL code me misunderstanding this.

Perhaps this is easier then I think - I don't know as I've never had the need to implement this sort of "more complex" ranking/voting functionality before - so I'd appreciate your responses.

NullUserException
  • 83,810
  • 28
  • 209
  • 234
user962026
  • 207
  • 1
  • 5
  • 12

1 Answers1

0

You should start by watching this video on youtube : Building Web Reputation Systems.

To emphasize the point, let me direct you to XKCD.

As for DB structure, you need following parts:

  • list of items ( with total_votes column )
  • list of user, which have voted
  • intersection table for the items-users ( with rating column, if you go with 5star thing )
tereško
  • 58,060
  • 25
  • 98
  • 150