Reputation: 47387
I love the way SO retains the edits to Q/A's and allows us to roll back if need be.
I'm looking for a DB structure concept on how to implement something similar to this. Can anyone give any insights?
My current solution is to have two tables like so...
Table1
ID | Date | UserID
.
Table2
ID | Table1ID | UserID | Title | Details
Upvotes: 0
Views: 61
Reputation: 284836
There are multiple ways to implement this. You can start by looking at the MediaWiki schema. See in particular the Revision, Page, and Pagecontent tables.
I believe StackOverflow's design is similar. However, according to this blog post, the StackOverflow devs ran into scalability issues with part of the design.
Upvotes: 2