Backend & systems·Data modelling and storage engines
you set a deleted flag instead of removing the row, and now every query in the codebase has to remember to filter on it.
Soft delete
Also calledtombstone, deleted_at
Marking records as deleted rather than removing them, to support undo, audit or referential integrity. The cost is that correctness now depends on every reader adding a predicate, and one forgotten filter surfaces deleted data. Unique constraints also stop working as written, because the tombstone still occupies the value.