Determining relationships


To initiate a Related Table Edit session, File-AID for Db2 must determine the relationships that exist for the table you are editing. It searches table SYSIBM.SYSRELS in the Db2 catalog to determine if referential integrity relationships exist. The relationship file is searched to determine what application relationships exist. If one or more relationships are found, the relationships appear in a selection list in a window. You select the desired relationship from the window or add a new one. If no relationships are found, you have the option of creating an AR.

See Diagram of Determining Relationships for a diagram of how relationships are determined.

Using an RI Relationship

If you select an RI relationship from the window or if the only relationship defined is an RI, File-AID for Db2 must retrieve the foreign key information before it can begin the session. File-AID for Db2 uses the foreign key information from the relationship file if it is the most current information. If the Db2 catalog information is more current, File-AID for Db2 retrieves the foreign key information from table SYSIBM.SYSFOREIGNKEYS.

If foreign key information must be retrieved from SYSIBM.SYSFOREIGNKEYS, the following message displays:

Referential Integrity information is being retrieved, please wait.
To avoid getting this message, a batch job may be run to update the File-AID for DB2 relationship file. See the File-AID Single Install Image
Installation and Configuration Guide appendix on Refreshing the
Relationship File.

Once the RI information is retrieved, File-AID for Db2 automatically updates the relationship file with the new information. Updating the file enables you to keep the relationship file as current as possible and avoids future queries to SYSIBM.SYSFOREIGNKEYS. Your Related Table Edit session can now be initiated.

Using an Application Relationship

If you select an application relationship or if the only relationship defined is an AR, File-AID for Db2 has all the required relationship information from the relationship file. A Related Table Edit session can begin without any further queries.

Diagram of Determining Relationships

image2021-3-10_14-8-16.png


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI DevX File-AID for Db2 23.01