3 added tag
| link
    Tweeted twitter.com/#!/StackDBAs/status/26729314263240704
2 edited title
| link

Good way to implement "undelete" feature How should deletions be handled in the database?

1
source | link

Good way to implement "undelete" feature

I'd like to implement an "undelete" feature in a web application such that a user can change her mind and recover a deleted record. Thoughts on how to implement this? Some options I've considered are actually deleting the record in question and storing the changes in a separate audit table, or not deleting the record and using a boolean "deleted" column to mark it as deleted. The latter solution would require additional application logic to ignore the "deleted" records under normal circumstances, but would make it much easier to implement recovering the records on the application side.