rating system connected to database