Relationships - Do you know to not use ON DELETE CASCADE clause when creating relationship?
Rules To Better SQL Databases - Developers|4e2c5421-72b9-46c2-b5c7-311882ec35fd
v1.0
Posted at
13/11/2019 11:58 AM by
Tiago Araujo
Rule Intro
SQL Servers ON DELETE CASCADE functionality can be very dangerous. We recommend not using it. Imagine someone deletes customer and the orders are deleted. If you need to delete records in related tables, do it in code in the application as it gives you more control.
{872E3EC0-A2B7-41BD-AEA3-E812E2104C4E}
Do you feel this rule needs an update?