DB Concept needed for record editing and rollback ability
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
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.
精彩评论