of course this is just an example, if i wanted it to be really fancy I would have images, e.g. stars, instead of buttons and do a nice mouseover effect to show the user how many stars they are rating it. also I would add extra rows to the table rate, like id and user so you can link the rates to the right object and only allow a user to rate on a particular item once