News for hackers. Stuff that matters.
Re:Reddit's database has only two tables by wisty on Monday September 03, 2012 @11:54AM (#4470762)
Every "thing" (a single table) has an attribute called "type". Type is a string, and is something like "comment" or "post" or "badge".

"table.create()" doesn't create a new table, I think it creates in index on "type", so you can treat it a bit like a separate table.

Yes, it is not a "real" database. It's a key-value store, which doesn't lose data.

Re:Reddit's database has only two tables by zzzeek on Monday September 03, 2012 @12:31PM (#4470915)
> "table.create()" doesn't create a new table,

if its a sqlalchemy.schema.Table, create() emits DDL for "CREATE TABLE" to the database (trust me, I wrote it). I'm guessing "table" here is some other object local to the reddit codebase.

anyway, how many "thing" tables are there total?