Skip to main content

Questions tagged [database-design]

For question about the design of the databases used by Stack Exchange. Consider adding the tag [database] or [architecture] as well. Do not use for database design questions in other contexts.

Filter by
Sorted by
Tagged with
37 votes
3 answers
2k views

Stack Overflow database design join issues

There are many questions already on meta-stackoverflow regarding the database schema, but here is another, that I don't think is a duplicate, so please read on. I read a description of the schema ...
Steg's user avatar
  • 371
19 votes
0 answers
183 views

Data Explorer execution plans are no longer available because SHOWPLAN permission is denied [closed]

I noticed after a recent maintenance downtime that now I get the following message when trying to include an execution plan with a query: SHOWPLAN permission denied in database 'StackOverflow'. ...
Paul Sweatte's user avatar
  • 1,815
15 votes
1 answer
8k views

Stack Overflow database model

I'm currently involved in a project to design and implement an in-house question-and-answer community for our university. We've explored some open source frameworks such as OSQA, but we are also ...
Bobbus's user avatar
  • 159
12 votes
1 answer
997 views

The real SO database schema (not public dump)

Is there any way (or real chance) to see the real SO database schema (not public dump)? I'm curious on how SO manages to scale so well. Does it use multiple databases? Or any kind of sharding ...
Graviton's user avatar
  • 9,074
9 votes
1 answer
382 views

How does SO store revisions?

How does SO store its revisions in the database? Does it use diffs? If so, what algo does it use?
pedro_sland's user avatar
8 votes
1 answer
604 views

Why does Stack Exchange use separate databases for each network site?

There are reasonable reasons for why separate sites are appropriate for Stack Exchange according to what it aims to be, and some of them are discussed here : Why is Stack Exchange split into multiple ...
4r4sh's user avatar
  • 123
8 votes
1 answer
231 views

How does Stack Overflow find 'Linked' questions?

How does Stack Overflow find 'Linked' questions? Does it store a list of links somewhere in the DB? Or does it extract them from posts/comments dynamically?
Eugene's user avatar
  • 467
5 votes
1 answer
167 views

How can a User's CreationDate be after they have posted?

I am currently analysing an Archive-Datadump of the apple.stackexchange.org. When looking on the posts.xml together with the users.xml, there is a strange anomaly. The earliest CreationDate among ...
pzfn's user avatar
  • 61
5 votes
0 answers
349 views

How are votes calculated on Stack Overflow

As far as I understand SO keeps votes in a separate table and calculates the post votes based on that data. So DB query can look like this assuming votes can be 1/-1. SELECT SUM(value) FROM votes ...
Tamerlane's user avatar
  • 493
4 votes
1 answer
401 views

Does Stack Overflow use EventSourcing to keep tracking of each change on a post edit?

I'm curious to know how does Stack Overflow store the revisions/versions of each post edition in the database? Does it represent each edition version in the database, following the Temporal Pattern? ...
Mik378's user avatar
  • 173
4 votes
1 answer
191 views

Does Stack Exchange use event sourcing?

This is a more technical question. I just found that I can browse the history of all my actions. Does Stack Exchange use event sourcing and store all my actions in the database? I wonder if CQRS is ...
Konrad's user avatar
  • 143
3 votes
1 answer
116 views

How does a post end up in the review queue?

I've read about Review Tasks here and examined the tables here. My questions are: What kinds of posts get to the review table? (E.g., questions, answers,..) What is the qualifying factor? Who/what ...
John Miller's user avatar
3 votes
0 answers
167 views

Where are the user's notifications stored?

Looking at the Stackoverflow's DB architecture, I wonder where does each user's notification get stored? For instance, someone answers a post I created, I am notified about it thanks to the top-bar ...
Mik378's user avatar
  • 173
2 votes
0 answers
81 views

How are network site user profiles linked?

This is a technical question aimed at the Stack Exchange developers I'm wondering about the database storage of each Stack Exchange site. Is each site stored in it's own database? Mainly however, ...
Peter Bridger's user avatar
2 votes
1 answer
410 views

Why did Stack Overflow put questions and answers in the same database table? [duplicate]

Possible Duplicate: Why does SO store questions and answers in the same table? I took a look at SO's HTML. I noticed that the ID number of a given question was very close to its answers' ID ...
Luke101's user avatar
  • 89
1 vote
2 answers
865 views

The Article "Understanding the StackOverflow Database Schema"-- Is it An Officially Sanctioned Article?

I found that there is an article entitled Understanding the StackOverflow Database Schema, I wonder how and where did the author get the source of information? Is it from public SO blog posts and ...
Graviton's user avatar
  • 9,074
1 vote
1 answer
397 views

Does Stack Exchange use a single database for all its sites? Or does it have a different instance for each?

All in the question title.
Andrew G. Johnson's user avatar
0 votes
1 answer
181 views

Can we ask for reviews of data models or ER diagrams on Stack Overflow?

Is it OK to ask questions concerning the data model of a specific system on Stack Overflow?
Tassisto's user avatar
  • 503
0 votes
2 answers
125 views

How can SO figure out the last active user on a post?

Does SO store post activity in a table? I'm asking because I notice, on the main page, the owner of the last activity is listed instead of the owner of the question. The posts table, as far as I can ...
Mohamad's user avatar
  • 959