Added ratings table, renamed sql