Return to Archive
Type: Protocol2026.04.10

Soft Deletes vs Hard Deletes

Author

Omnath Dubey

Research Visual
SRC: LABORATORY_RENDER_01
STATUS: VERIFIED

Using `deleted_at` columns vs removing rows. The trade-offs in complexity and compliance.

### Soft Delete Add `deleted_at` timestamp. **Pros**: Easy undo. Data retention. **Cons**: Every single query must include `WHERE deleted_at IS NULL`. Indexes get bloated with "dead" data. GDPR "Right to be Forgotten" is harder (you technically still have the data). ### Hard Delete Delete the row. **Pros**: Clean DB. Compliance is easy. **Cons**: No undo. **Best Practice**: Use Hard Delete + Archive Tables for audit logs.
#Database#Architecture#SQL#Data
Share Protocol

Related Protocols

View Archive