Hello Dave,
as first, let me kindly inform you that you shouldn't perform any direct changes in the database if it's not necessary. It can cause an inconsistency in the database and also Kentico is not reflecting changes which were made directly in the database immediately, for testing purposes in this scenario, you can try a different browser, login as a different user and rate a document.
Moreover, I've tested this functionality and rating is working correctly on the last hotfix 7.79.
So maybe try to apply the latest hotfix if you are experiencing any problems.
Regards, Martin