Q:

Buzzfeed inspired voting system

Buzzfeed allows you to rate something as: 
* LOL 
* Win 
* OMG 
* WTF 
* Cute 
* Fail
* Geeky 
* Trashy
* Old
* Ew 

Lets say you had a table called Post, and you created a table called Post_Ratings (post_id, rate_id) and a table called Rating for this. 
What would be the best way to implement this table? An enum or a column for each rating?
Also to record what post a user has already voted on a table called user_rating containing user_id, post_id, right?

A:

If you had a table of ratings, it would be rating_id (int) and rating_text (string).  Your Post_Ratings table needs another column.  There are at least three key columns (unless you use a surrogate key).  These would be post_id, rating_id, and something to differentiate multiple ratings by different users.  If you have a user table then you could use a user_id.  That way, if a user wants to change their vote, they can, but you don't get users voting multiple times in different categories.  Last one in wins for each user.
Also, I wouldn't use an enum or columns, both are likely to run you into trouble at some point.  The best design is to make one vote take up one row (with the three columns indicated).  This way you can easily tally the number of votes for each post using each rating and you can even easily count the number of posts rated with each rating_id.  If you add a fourth column to Post_Rating to contain the date and time when a vote was captured, that gives you even more flexibility for reporting and relating data.

