5 ms·
Soft deletion is important if you want to do analytics on your data. Hard deletes mean that you can never reconstruct an accurate history. Also, if you’re not
by kdamica 3y ago
Soft deletion is important if you want to do analytics on your data. Hard deletes mean that you can never reconstruct an accurate history.
Also, if you’re not careful, hard deletes can lead to primary keys getting reused, which can cause all kinds of problems if the delete doesn’t cascade into every other system. I had this happen in practice once and it was a huge pain.
- taeric 3y agoOf course, soft deletes can cause their own problems where you do want to reuse a key. That, or you have to start imposing uniqueness constraints on a non-key value. Certainly valid, but not at all user friendly. Consider, if you are creating resources in something like a cloud provider, you can setup permissions to things if they are based on names or tags. If that name or tag is a UUID like thing, that means you cannot setup the permissions before the thing is created. And if it is ever accidentally deleted, you cannot restore things easily.
- 0x457 3y agoYou can't reconstruct an accurate history with either style of deletes. Only append-only event logs allow that.