What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

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 numbers. Sometimes they were just only a few units off from each other. I can conclude only that SO puts questions and answers in the same table. What is the advantage of doing it this way?

I would have put questions and answers in different tables, and used foreign keys in the answers table to refer back to the question table. Can someone enlighten me?

share|improve this question

migrated from stackoverflow.com Nov 25 '09 at 7:50

This question came from our site for professional and enthusiast programmers.

marked as duplicate by random, fretje, Ladybug Killer, cletus, Ólafur Waage Nov 25 '09 at 9:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

If stack overflow uses oracle they might have just shared a common sequence. Or perhaps they use a different method of generating IDs. Perhaps the IDs are generated by a service and put into the database.

share|improve this answer
    
I think they settled on a Microsoft stack since that's what they knew best. –  paxdiablo Nov 25 '09 at 7:50
    
The database schema has been posted numerous places including the SO blog, Meta and SO itself. Have a look at sqlserverpedia.com/wiki/… –  phidah Nov 25 '09 at 7:50

Not the answer you're looking for? Browse other questions tagged .