title: How to implement a rating system that also supports querying for top rated "today, week, month"
body: <p>I've been looking for some good rating system tutorials on the internet and I can't seem to find the one i'm looking for! 
  I've come across this article <a href="http://www.expertcore.org/viewtopic.php?f=74&amp;t=1451" rel="nofollow">http://www.expertcore.org/viewtopic.php?f=74&amp;t=1451</a> which uses the Bayesian Rating algorithm and a like/dislike rating and that one is the rating system I want except that system can only make a "Top rated list of all time", I want to be able to make a "Top rated of today", "Top rated of this week" and "Top rated of this month" aswell. I'm not to sure of how I'll have to approach this problem because I'm not really great at database designs and I don't want to encounter performance issues later on!</p>
  
  <p>Example I have these three tables.</p>
  
  <p>Table "Item"
  id
  name</p>
  
  <p>Table "User"
  id
  name</p>
  
  <p>Table "Vote"
  id
  itemID
  userID
  date</p>
  
  <p>The normal algorithm is this:
  br = ( (avg_num_votes * avg_rating) + (this_num_votes * this_rating) ) / (avg_num_votes + this_num_votes)</p>
  
  <p>So to get a top rated list of all time I'll have to calculate the BR for every item I have. Would it mean if I want the top rated list of this month I just do the same but check if the date of the votes are valid? Please give me tips and hints ! </p>