design - Database with "Open Schema" - Good or Bad Idea? -


Reddit's co-founder gave a presentation on those issues while scaling millions of users. Summary is available

I wonder, point 3:

Instead, they keep a thigh table and a data table. Everything in Reddit is one thing: users, links, comments, novels, awards, etc. Commonly, such as up / down votes hold a type and date of construction. There are three columns in the data table: Object ID, Key, Value is one line for each attribute, there is a line for the title, URL, author, spam vote, etc. When they add new features, they did not have to worry about the database. They did not have to worry about adding or upgrading new tables for new things.

This seems like a terrible idea to me, but it seems that it has worked for reddit, is it a good idea, though? Or is it the specialty of the Reddit that happened to work for them?

This is a data model known for unit-attribute-value A key example of this is patient examination data, which is naturally sparse as there are several thousands of tests that can be walking, but usually only a handful of patients are present for hundreds of columns With a table is not stupid, but a table with EAV is good Makes i.


Comments