Avoiding the soft delete anti-pattern
31–40 of 61 posts
Re: Avoiding the soft delete anti-pattern
#32The main problem I have is the article takes a performance/devlopment lens to soft deletes, and only pays lip service to the objectives you're trading off performance for with soft deletes ... namely data retention / disaster recovery / audit requirements. * availability / recovery - soft deletes provide the best RPO/RTO in archival / lifecycle planning * auditability / compliance - much easier to achieve with 1 syst…
Re: Avoiding the soft delete anti-pattern
#33How about a separate, schema-wise identical "deleted_x" table that you "move" deleted entities to? Can't get much more explicit than that, and still enables whatever joins you'd like on historical deleted data.
Unless you automate it devs will have to remember to migrate both when making a change which adds some overhead, not a lot, but it's just something to consider here imo as some migrations (schema and/or data) can become nasty and complex
Re: Avoiding the soft delete anti-pattern
#34The main problem I have is the article takes a performance/devlopment lens to soft deletes, and only pays lip service to the objectives you're trading off performance for with soft deletes ... namely data retention / disaster recovery / audit requirements. * availability / recovery - soft deletes provide the best RPO/RTO in archival / lifecycle planning * auditability / compliance - much easier to achieve with 1 syst…
Yeah, before breaking out Debezium, Kafka Connect and S3, consider soft delete first. It might not scale, but maybe you don't need to scale just yet, and maybe a column called is_deleted is far more appropriate and far less complex for your current purposes.
Re: Avoiding the soft delete anti-pattern
#35Re: Avoiding the soft delete anti-pattern
#36Maybe a better recommendation is to give guidelines for implementing soft-delete?
Re: Avoiding the soft delete anti-pattern
#37Re: Avoiding the soft delete anti-pattern
#38Re: Avoiding the soft delete anti-pattern
#39But what about data overwrites? This is basically the same as deleting data, since information will be destroyed. Using soft delete is a somewhat naive solution if there is no mechanism for restoring overwritten data.