exercise in python+sqlalchemy, from http://chriszf.github.com/ratings/