Cascading Deletes

If a table includes a cascading delete, when a parent row is deleted, the children are also deleted. If both the parent and child tables participate in replication, the deletes for both the parent and child are replicated to the target servers.

If the same table definition exists on the target database, Enterprise Replication attempts to delete the child rows twice. Enterprise Replication usually processes deletions on the parent tables first and then the children tables. When Enterprise Replication processes deletions on the children, an error might result, because the rows were already deleted when the parent was deleted. The table in Table 1 indicates how HCL Informix® Enterprise Replication resolves cascading deletes with conflict resolution scopes and rules.

For more information on cascading deletes, see the ON DELETE CASCADE section in the IBM® Informix Guide to SQL: Syntax.

Table 1. Resolving Cascade Deletes
Conflict-Resolution Rule Conflict-Resolution Scope Actions on Delete Errors
Time stamp Row-by-row or transaction Continue processing rest of the transaction
Delete wins Row-by-row or transaction Continue processing rest of the transaction
Ignore Transaction Abort entire transaction
Ignore Row-by-row Continue processing rest of the transaction

Copyright© 2018 HCL Technologies Limited