Last I spoke with Steve Huffman, he told me they were running on top of PostgreSQL, but maybe they switched to something non-relational in the most recent rewrite. Now you've got me curious; I'll check the source.
That's not the problem, apparently, it's that what Reddit built on top of the SQL is a huge list of key/value pairs or something like that - in any case it's not as simple as an SQL query.
Our friends at Tricycle will push through a zero-based karma system (no self-voting possible) sometime this evening. At present this will only cover future posts/comments - they may go back and revise history some time in the indefinite future (or not), but apparently that would be overly complicated for now. We'll see how this works.