cascading updates and deletes
A behavior of database server programs in which changes (edits or deletions) you make to a primary key value are cascaded through the entire database so that all records depending on this value are updated.
For example, edit the Division Code field in the Divisions table and the database server programs cascade through the database and update all foreign keys affected by this change, changing the Division Code values in the Floors, Rooms, Sites, Departments, Equipment, Work Orders, and any other tables that contain the Division Code field.
For deletion, the program does the following:
-
if the foreign key field does not allow null and the parent record is deleted, deletes the child record.
-
if the foreign key field allows null, retains the child record and sets the record’s foreign key to null.
-
In /confing/context/core/core-optional.xml, the bean
cascadeDeleteDoNotAllowNullFieldsNames
disables theallow_null
property of the fields for cascading delete for the listed fields. That means the child record will be deleted if the parent record is deleted no matter the allow null value.
For Sybase databases, cascading update is built into its data definition language. Implementations running Oracle or Microsoft SQL database servers use the Archibus cascading update and delete feature.
As described in System Management Help, system administrators control the behavior of cascading updates and deletes for Oracle and Microsoft SQL by:
-
setting the
afm_scmpref.afm_cascades_changes
field to disable and enable the entire Archibus cascading update and delete feature.
-
editing /confing/context/core/core-optional.xml and setting
cascadeDeleteEnabled
andcascadeUpdateEnabled
to set cascading functionality for only deletes, only updates, or both.