Home > database >  Difference of cascade delete and delete triggers
Difference of cascade delete and delete triggers

Time:11-09

Difference of cascade delete and delete triggers

CodePudding user response:

From the function, essentially no difference between
But the design of the trigger to delete is more complicated

CodePudding user response:

Is a kind of constraint of cascade deletion (constraint).
The delete trigger is a trigger (trigger).

CodePudding user response:

Associated with the relationship between tables to processing, to the same database, design to establish good relations, can trigger across databases, is more flexible

CodePudding user response:

Cascading delete, it is only an option, and foreign key constraints that is dependent on foreign key of cascade deletion,

The delete trigger, he can realize the function of many, depends on what statement is written by a user, use the trigger synchronization delete child table data, just a common applications,
  • Related