3 ms·
The Stackoverflow schema is decent. Especially for someone that is a relative amateur to study. It's nothing special or complex, however it's a good example of
by adventured 7y ago
The Stackoverflow schema is decent. Especially for someone that is a relative amateur to study. It's nothing special or complex, however it's a good example of something that actually works well in practice (and at massive scale). The CRUD-CMS Q&A style lends itself nicely to a basic db schema that is easy to get your head around at a glance.
https://meta.stackexchange.com/questions/2677/database-schema-documentation-for-the-public-data-dump-and-sede https://meta.stackexchange.com/questions/2677/database-schem...
https://i.stack.imgur.com/AyIkW.png https://i.stack.imgur.com/AyIkW.png
19 million questions, 29m answers, 12m users, 10m visits per day, and most of the db action is in less than two dozen tables.
- felixyz 7y agoThis is the only answer yet that seems to actually answer the question :) Great example!
- jaxn 7y agoInteresting to see the denormalization of user Display names on the most important tables, but not everywhere.
- AdrianB1 7y agoSeeing some training sessions on performance tuning that use this database as the example, an educated guess is that it's done on purpose. I saw a few cases where usual rules have to be bent to get functionality, sometimes reality beats the book.
- jaxn 7y agoOh, I'm sure it is on purpose. I have had the same problem before and seeing this example makes me a little more comfortable to denormalize like that. I'm curious what they do if someone changes their name (though that should be really rare on SO)
- noisy_boy 7y agoAny idea which tool was used to generate the ER diagram?
- adventured 7y agoI believe it was: https://dbschema.com https://dbschema.com
- noisy_boy 7y agoThank you!