Homework for database class, based on play framework