soft delete
Marking a row as deleted, for example by setting a deleted_at date, instead of removing it.
In more detail
The history stays recoverable and foreign keys stay valid, but every query must remember to exclude deleted rows. Use it for records with lasting business value.
Related terms
- DELETE statement — The SQL statement that removes rows from a table, choosing them with WHERE.
- CASCADE — A foreign key action that deletes child rows automatically when their parent row is deleted.
- entity — A thing in an application's domain with its own identity, such as a user, account or product, usually stored in a database.
- intersection type — A type written A & B that requires a value to satisfy both types at once, combining their properties.
Taught in
- Updating And Deleting Safely — PostgreSQL, Indexing & Relational Data Modeling
- Union Types, Intersections And Property Conflicts — Production TypeScript