At my current workplace, there is a group of programmers working on our next-generation app for in-house work. Their work includes the design of the enterprise DB, which is where I have a question for people.
In the current design, they are implementing in-table row versioning. In this implementation, when a row is modified, instead of actually modifying the existing row, the original row is flagged as 'deleted', and a new row is added. A pair of Date fields indicate the date/times that the row was valid from - to (labeled as Date added and date modified), with no IsDeleted flag indicating the current row.
Each table will have an identity field, and a second surrogate 'Identity' field for identifying the rows related to one entity. The table's PK (and a clustered index) will be based on the second 'Identity' field.
Personally, I believe that tables like this will become increasingly problematic as time goes on, growing ridiculously large and slow to query, and difficult to run applications against. However, I need some actual information on this:
1) Has anyone ever actually considered an implementation like this in SQL Server?
2) If so, what were your thoughts on this?
3) If you went to Implementation, what were the results?
4) Are there any existing theoretial works that support this methodology? If so, what are they?
This is one of the most intelligent groups I know on SQL Server questions, and I would really like an assist on answering this.
Points will be split, or supplemental points will be added in extra questions. Thanks!
by: amit_gPosted on 2005-06-08 at 12:17:21ID: 14173731
What is the basic purpose of versioning? Audit or real need for the application that uses this database?