If you want to make sure people don't vote multiple times,
you'll generally need to do a second table, that keeps track of the
votes by IP address (or other identifier if you have one). You can
include the column there which would have the user's vote (0 or 1
or a range of votes) and then can run sums and averages on it by
message ID.