As EA struggles toward more complete Data Modelling capability, one thing which ought to be taken into consideration is extending the Referential Integrity group in the Foreign Key Constraints dialog.
Currently, there is support for the following:
Activity:
INSERT
Parent Action: None
UPDATE
Parent Action: None, Cascade
Child Action: None
DELETE
Parent Action: None, Cascade
Child Action: None
The more complete set is:
INSERT
Parent Action: None
Child Action: None, Restrict, Set Null
UPDATE
Parent Action: None, Cascade
Child Action: None, Restrict, Set Null
DELETE
Parent Action: None, Cascade, Restrict
Child Action: None, Restrict
The definition for these concepts is quite well known, but for the sake of completeness:
Restrict (parent action): Verifies the existence of child records and prevents deletion of the parent if any such children exist (the inverse of cascade delete).
Cascade: Propagates any modification of a primary key value to the corresponding foreign key values in the child table. Can also be used to propagate the deletion of the parent to the deletion of the child.
Set Null: Verifies the existence of the foreign key values in the parent table’s primary key. If the values cannot be validated, the trigger sets the foreign key values to null in the child table and lets the data modification operation proceed
Restrict (child action): Verifies the existence of foreign key values in the parent table’s primary key and prevents the insertion, or updating of data if the values cannot be validated. On Delete, can be used to restrict the deletion if the cardinality of the relationship would fall below the minimum.
Thoughts? Votes?
Paolo