Easy, alternative soft deletion: `deleted_record_insert`
1–10 of 109 posts
Re: Easy, alternative soft deletion: `deleted_record_insert`
#2how do you recover deleted records?
Re: Easy, alternative soft deletion: `deleted_record_insert`
#3oh nice. how do you recover deleted records?
Re: Easy, alternative soft deletion: `deleted_record_insert`
#4oh nice. how do you recover deleted records?
I’ve never encountered a database where I needed to know about non-current records but only ever the last-before-deletion state of deleted records, whether for data recovery or any other purpose.
Re: Easy, alternative soft deletion: `deleted_record_insert`
#5Re: Easy, alternative soft deletion: `deleted_record_insert`
#6oh nice. how do you recover deleted records?
Re: Easy, alternative soft deletion: `deleted_record_insert`
#7Usually if you’re changing the way a primary function of the database works, like delete, it’s probably not a good move.
Re: Easy, alternative soft deletion: `deleted_record_insert`
#8Re: Easy, alternative soft deletion: `deleted_record_insert`
#9My question when people implement a generic feature like this, is why doesn’t the database do it? And many tunes, as is the case with soft delete, it does. For example, Redshift tombstones records and you can choose when to “vacuum” them up (actually delete them). Usually if you’re changing the way a primary function of the database works, like delete, it’s probably not a good move.
This is one of those things where business requirements trump the technical implementation details. Prevailing theory is that actual deletes are bad because you can’t do historical analysis, recovery etc on the data. Say a customer stops using a service for a year but comes back: it’s a big win if you can (at least optionally) restore their data, so the theory goes.
That’s why tricks like this exist.
The alternative is to write the data to a separate database and/or table that’s meant for archive purposes. I think it’s better than these soft delete tricks but it’s got complexity too. More resilient IMO and let’s production systems run leaner over time IMO