Luke_A_Somers comments on [moderator action] Eugine_Nier is now banned for mass downvote harassment - Less Wrong
You are viewing a comment permalink. View the original post to see all comments and the full post content.
You are viewing a comment permalink. View the original post to see all comments and the full post content.
Comments (366)
It has to - otherwise you wouldn't be able to see what YOU upvoted/downvoted.
Also, otherwise you would be able to upvote or downvote something multiple times.
So clearly, it has to track somewhere.
If you guys need a SQL guy to help do some development work to make meta-moderation easier, let me know; I'll happily volunteer a few hours a week.
EDIT: AAAUUUGH REDDIT'S DB USES KEY-VALUE PAIRS AIIEEEE IT ONLY HAS TWO TABLES OH GOD WHY WHY SAVE ME YOG-SOTHOTH I HAVE GAZED INTO THE ABYSS AAAAAAAIIIIGH okay. I'll still do it. whimper
Being fairly ignorant of databases... how would you have laid it out better, in a general sense?
Structured tables. One for posts, one for comments, one or more for karma and so on, with appropriately typed columns for each attribute such things have. Alternatively if the data really is unstructured then I'd use a key-value store like Cassandra or something.
(For the record many modern key-value stores didn't exist when the Reddit code was originally written).
Seconding this. A proper relational database would look something like this:
With that schema, all you'd have to do to see someone's effect on another person's karma is:
EDIT: Wow, formatting is a pain.
It's heartwarming to see off-the-cuff SQL that includes foreign key constraints.
Heartwarming enough to offer me a job? ;)
EDIT: Downvoted? Ouch...