Editing Primary Keys that Link to Other Tables
Archibus Smart Client
Archibus Web Central
Editing Primary Keys that Link to Other Tables
Each record has a field, called the primary key, that is a unique identifier for the record. Primary keys are rarely changed, but if you edit or delete a primary key that links to records in other tables, all of the records that use this value also need to be updated. When you edit a primary key, you do not need to be concerned about updating all records relying on this primary key; the cascading update and delete feature makes such updates for you. For example:
-
If you edit a division code, all employees working in this division, all departments assigned to this division, all work orders charged to this division, and so forth, are also updated.
-
If you delete a primary key, the feature also deletes the child records. For example, the Buildings table contributes its primary key to the multi-part primary keys for its Floor and Room records. If you delete the record for building HQ, then Archibus also deletes the Floor and Room records that include HQ as part of their primary key. For complete information, see Cascading Update and Delete (System Management Help) .
Implementations running Oracle or Microsoft SQL database servers use the Archibus cascading update and delete feature.
Archibus cascading update and delete operations are invoked as jobs. You can view the actual progress for a job by viewing its job status, and can continue working while the job executes. See Running Jobs.
Note : Drawings are published with the primary key data of assets that are within them. For this reason, if the bl_id for rooms is changed, then the drawings need to be republished so that the assets can be displayed correctly. The cascading update does not republish drawings automatically. You must manually republish the drawings by running the Publish Enterprise Graphics command, or your System Administrator can create a script to do so.
Controlling Cascading Updates and Deletes
System administrators can control the behavior of cascading updates and deletes for Oracle and Microsoft SQL:
-
You can enable and disable the entire cascading update and deletion feature by setting the Use Archibus Features for Cascade? field of the Archibus Schema Preferences table (the
afm_scmpref.afm_cascades_changes
field).
-
You can control whether the system cascades updates, deletes, neither, or both by editing /confing/context/core/core-optional.xml and setting
cascadeDeleteEnabled
andcascadeUpdateEnabled
.
For complete information, see Setting Up Cascading Update and Delete (System Management Help) .