Is there a best practice for maintaining history in a database?
Posted
by Pete
on Stack Overflow
See other posts from Stack Overflow
or by Pete
Published on 2010-05-20T15:26:11Z
Indexed on
2010/05/20
15:30 UTC
Read the original article
Hit count: 197
database-design
I don't do database work that often so this is totally unfamiliar territory for me.
I have a table with a bunch of records that users can update. However, I now want to keep a history of their changes just in case they want to rollback. Rollback in this case is not the db rollback but more like revert changes two weeks later when they realized that they made a mistake. The distinction being that I can't have a transaction do the job.
Is the current practice to use a separate table, or just a flag in the current table?
It's a small database, 5 tables each with < 6 columns, < 1000 rows total.
© Stack Overflow or respective owner