Hi

I'm starting to develop a website that allows users to rate articles. I am currently stuck with a bit of a problem.

Do I store a rating for each article from each user in a table and query it every time I want to know an articles rating, or I want to know a users average rating?

OR

Do I store these in the article and user tables so that I don't have to query the database as heavily every time I wish to know this data?

OR

I could do both and update the ratings every time a new rating is added. This would mean that the database isn't over-queried every time a user loads a page.

Any insight would be really helpful

Dan