Hacker News new | past | comments | ask | show | jobs | submit login

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.



19 million questions, 29m answers, 12m users, 10m visits per day, and most of the db action is in less than two dozen tables.

This is the only answer yet that seems to actually answer the question :) Great example!

Interesting to see the denormalization of user Display names on the most important tables, but not everywhere.

Seeing 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.

Oh, 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)

Any idea which tool was used to generate the ER diagram?

I believe it was: https://dbschema.com

Applications are open for YC Summer 2020

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact