To have a nice star-clicky control, yeah you need javascript. So you should do jQuery.
Yes, you'll want to store stuff in a database. You could use PHP and MySQL for that.
Given this is a class assignment, thats a lot to implement. Consider cheating by using an existing CMS. Drupal in particular has functionality similar to what you ask for. You won't have to learn much of Drupal, just buy the book "Using Drupal". Chapter 4 will show you how to:
... build a community product review website, with ... and Fivestar modules providing a rating widget.
Drupal is PHP based and uses MySQL as its database, so it seems to match where you were going. It may take a bit to get Drupal running... but then you can get to chapter 4 in a snap.
If the teacher insists you write code, Drupal is open source and its easy to add custom modules.