Soft delete
Soft deletion is a technique that marks data as deleted while retaining it in storage rather than immediately removing it physically.
API Design Patterns
Soft deletion is a deletion technique that marks a resource as deleted while retaining it until later physical removal or completion of a deletion process.
- How it is used
- Protects API users from accidental permanent deletion while preserving explicit paths for restoration and final removal.
- How deep it goes
- Defines storage markers, modifies GET, LIST, and DELETE, adds undelete and expunge, and addresses integrity, repetition, expiration, and versioning.
- Examples
- Uses ChatRoom endpoints, includeDeleted listing, undelete, expunge, deleted, and expireTime to demonstrate the resource lifecycle.
- What you can do after
- Operate a soft-deleting resource API with explicit listing, restoration, permanent-removal, expiration, and referential-integrity rules.
Crack Any Codebase with AI
A soft delete marks a record as deleted while retaining it in the database, typically with a deletion timestamp.
- How it is used
- Uses soft deletion as a prompt for inspecting hidden schema and query costs before judging production scalability.
- How deep it goes
- Defines retention-based deletion and flags query, index, and write-cost consequences without detailing implementation mechanics.
- Examples
- Uses the indexed Booking table and append-only audit log to illustrate read optimization versus write cost.
- What you can do after
- Diagnose soft-deletion risks by checking exclusion filters, index coverage, and write amplification.
ASP.NET Core in Action, 3e
Soft delete is a deletion technique that marks a record as deleted so it is excluded from application exposure while remaining stored.
- How it is used
- Hides deleted records from application and API exposure while preserving their database rows.
- How deep it goes
- Explains the flag, delete method, and retrieval filters, while deferring broader scenario-specific limitations.
- Examples
- Uses a Recipe entity, an IsDeleted property, DeleteRecipe, and Where clauses as working examples.
- What you can do after
- Operate/configure an EF Core service that marks records deleted and prevents ordinary queries from returning them.
Also covered in
What to know first
- foreign keyA foreign key is a column or set of columns whose values reference a key in the same or another relational table, linking records and supporting referential integrity.
Related concepts
- hard deletealternative to · A hard delete permanently removes data or a resource from its physical storage rather than merely marking it as deleted.
- booleanuses · A Boolean is a logical value or data type representing truth or falsity, conventionally with the two values true and false.
- HTTP methodimplemented by · An HTTP method is a standardized token in an HTTP request that indicates the operation the client intends to perform on a resource.
- list methodused by · A list method is an API operation that retrieves the resources belonging to a specified collection.
- referential integrityuses · Referential integrity is the property that references between related data records or relations correspond to valid, existing keys or records.
- storage accountpart of · A storage account is a top-level Azure resource that provides a namespace, access boundary, and configuration for storage services and their data.
Questions about soft delete
What is soft delete?
Soft deletion is a technique that marks data as deleted while retaining it in storage rather than immediately removing it physically.
Which Manning books explain soft delete?
API Design Patterns, Crack Any Codebase with AI and ASP.NET Core in Action, 3e.
What should I know before learning soft delete?
Manning books that teach soft delete usually introduce foreign key first.
What is the difference between soft delete and hard delete?
Soft deletion is a technique that marks data as deleted while retaining it in storage rather than immediately removing it physically. A hard delete permanently removes data or a resource from its physical storage rather than merely marking it as deleted.
What is soft delete part of?
Soft delete is part of storage account. A storage account is a top-level Azure resource that provides a namespace, access boundary, and configuration for storage services and their data.
What is soft delete also called?
Soft delete is also called soft deletion.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


