liveBook · Manning

On delete cascade

ON DELETE CASCADE is a relational foreign-key action that automatically deletes referencing rows when their referenced row is deleted.

How 3 Manning books explain it

Java Persistence with Spring Data and Hibernate epub

ON DELETE CASCADE is a relational foreign-key action that automatically deletes referencing rows when the referenced row is deleted.

How it is used
Uses database-enforced cascading to remove dependent association rows efficiently when an owning row is deleted.
How deep it goes
Defines database-side deletion and schema annotation, but stops short of changing Hibernate runtime behavior.
Examples
Demonstrates Item and Bid deletion with H2, Hibernate @OnDelete, and a generated foreign-key cascade.
What you can do after
Operate/configure Hibernate schema generation with @OnDelete and verify whether the target DBMS supports the resulting foreign-key action.

Read how Java Persistence with Spring Data and Hibernate epub explains on delete cascade →

Designing AI Systems

ON DELETE CASCADE is a relational database constraint action that automatically deletes dependent rows when their referenced row is deleted.

How it is used
Enforces dependent-row cleanup when deleting a session from a PostgreSQL-backed session service.
How deep it goes
Defines the foreign-key action and its operational effect, but leaves the delete_session implementation as an exercise.
Examples
Uses sessions and messages linked by session_id to demonstrate automatic dependent-row deletion.
What you can do after
Operate/configure PostgreSQL schemas so deleting a session automatically removes its associated messages.

Read how Designing AI Systems explains on delete cascade →

Build Financial Software with Generative AI (From Scratch)

ON DELETE CASCADE is a database referential action that automatically deletes dependent records when their referenced parent record is deleted.

How it is used
Prevents orphaned ACH hierarchy records by deleting dependent rows when parent records are removed.
How deep it goes
Defines the referential-action use case and hierarchy, but stops short of showing executable SQL or a deletion workflow.
Examples
Uses ACH file, batch header, entry, addenda, and control records to demonstrate dependent deletions.
What you can do after
Configure foreign keys with ON DELETE CASCADE to remove invalid dependent ACH records automatically.

Read how Build Financial Software with Generative AI (From Scratch) explains on delete cascade →

Related concepts

Questions about on delete cascade

What is on delete cascade?

ON DELETE CASCADE is a relational foreign-key action that automatically deletes referencing rows when their referenced row is deleted.

Which Manning books explain on delete cascade?

Java Persistence with Spring Data and Hibernate epub, Designing AI Systems and Build Financial Software with Generative AI (From Scratch).

What is the difference between on delete cascade and MySQL?

ON DELETE CASCADE is a relational foreign-key action that automatically deletes referencing rows when their referenced row is deleted. MySQL is a relational database management system that stores, manages, and queries structured data using SQL.

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.