RI relationship detail screen


Depending on your RI Load Scope option selection in the Db2 RI Update Online Options Screen the RI Relationship Detail screen has a different look.

RI Load Scope Option 1

When selecting RI Load Scope Option 1, the RI Relationship Detail screen displays as shown in the following figure.

RI Relationship Detail Screen RI Load Option 1

 File-AID/RDX    ------  RI Relationship Detail  ------------ Row 1 to 3 of 3
 Command ===>                                                   SCROLL ===> CSR
                                                                               
 Primary Commands: ALL                                                          
    Line Commands:  S = Select Relationship to Load    D = Delete Relationship  
                 I = Relationship Information                                   
                                                                               
 Base Object:    LOCATION.FRSAMP.ORDER_TABLE                                    

                                                    Obj  Rel       
 CMD     Parent/Dependent                           Type Type      Status
 --- ---------------------------------------------- ---- ----- -----------------
  _  LOCATION.FRSAMP.ORDER_TABLE                    DB2  RI    Not in Dataset
       LOCATION.FRSAMP.ORDER_LINE_TABLE              DB2        
  _  LOCATION.FRSAMP.PART_TABLE                     DB2  RI    Not in Dataset
       LOCATION.FRSAMP.ORDER_LINE_TABLE              DB2        
  _  LOCATION.FRSAMP.PART_TABLE                     DB2  RI    Not in Dataset
       LOCATION.FRSAMP.SUPPLIER_TABLE                DB2        
 ******************************* Bottom of data ********************************

This screen lists all Db2 RI relationships associated with the driving table, the Db2 table specified in the Base Object: field, the table for which you had specified the Load RI option or L line command.

Use this screen to load and refresh relationships in the File-AID/RDX relationship file (S line command or ALL primary command), delete relationships from the relationship file (D line command), and select relationships about which you want to view more detailed information (I line command).

This screen displays information from the Db2 catalog and File-AID/RDX’s relationship file about all RI relationships involving the specified table.

Relationships in which the driving table is either the parent or the dependent are listed first. Those relationships that involve the dependents of the driving table are listed below and are marked ASSOCIATED REL.

RI Load Scope Options 2, 3, or 4

When selecting RI Load Scope Options 2, 3, or 4, the RI Relationship Detail screen displays as shown in the following figures. The screens are identical, only the listed relationships are different.

In this version of the RI Relationship Detail screen you can only load or update RI relationships in your relationship file. The D (Delete) and I (Information) line commands are not available.

RI Relationship Detail Screen RI Load Option 2

 File-AID/RDX    ------  RI Relationship Detail  ------------ Row 1 to 1 of 1
 Command ===>                                                   SCROLL ===> CSR
                                                                               
 Primary Commands: ALL                                                          
    Line Commands:  S = Select Relationship to Load    
                                                                               
 Base Object:    LOCATION.FRSAMP.ORDER_TABLE                                    

                                                    Obj  Rel       
 CMD     Parent/Dependent                           Type Type      Status
 --- ---------------------------------------------- ---- ----- -----------------
  _  LOCATION.FRSAMP.ORDER_TABLE                    DB2  RI    Not in Dataset
       LOCATION.FRSAMP.ORDER_LINE_TABLE              DB2        
 ******************************* Bottom of data ********************************

RI Relationship Detail Screen RI Load Option 3

File-AID/RDX    ------  RI Relationship Detail  ------------ Row 1 to 4 of 4
 Command ===>                                                   SCROLL ===> CSR
                                                                               
 Primary Commands: ALL                                                          
    Line Commands:  S = Select Relationship to Load    
                                                                               
 Base Object:    LOCATION.FRSAMP.ORDER_TABLE                                    

                                                    Obj  Rel       
 CMD     Parent/Dependent                           Type Type      Status
 --- ---------------------------------------------- ---- ----- -----------------
  _  LOCATION.FRSAMP.ORDER_TABLE                    DB2  RI    Not in Dataset
       LOCATION.FRSAMP.ORDER_LINE_TABLE              DB2        
  _  LOCATION.FRSAMP.CUSTOMER_TABLE                 DB2  RI    Not in Dataset
       LOCATION.FRSAMP.CONTACT_TABLE                 DB2                     
  _  LOCATION.FRSAMP.PART_TABLE                     DB2  RI    Not in Dataset
       LOCATION.FRSAMP.ORDER_LINE_TABLE              DB2                     
  _  LOCATION.FRSAMP.PART_TABLE                     DB2  RI    Not in Dataset
       LOCATION.FRSAMP.SUPPLIER_TABLE                DB2
 ******************************* Bottom of data ********************************

RI Relationship Detail Screen RI Load Option 4

File-AID/RDX    ------  RI Relationship Detail  -------- Row 1 to 7 of 4,454
 Command ===>                                                   SCROLL ===> CSR
                                                                               
 Primary Commands: ALL                                                          
    Line Commands:  S = Select Relationship to Load    
                                                                               
 Base Object:    LOCATION.FRSAMP.ORDER_TABLE                                    

                                                    Obj  Rel       
 CMD     Parent/Dependent                           Type Type      Status
 --- ---------------------------------------------- ---- ----- -----------------
  _  LOCATION.$172.AGTANSIR                         DB2  RI    Not in Dataset  
       LOCATION.$172.AGTANSHS                        DB2                       
  _  LOCATION.$172.AGTZIP                           DB2  RI    Not in Dataset  
       LOCATION.$172.AGTANSIR                        DB2  
  _  LOCATION.$172.AGTVER                           DB2  RI    Not in Dataset  
       LOCATION.$172.AGTASGN                         DB2  
  _  LOCATION.$172.AGTZIP                           DB2  RI    Not in Dataset  
       LOCATION.$172.AGTASGN                         DB2  
  _  LOCATION.$172.AGTZIP                           DB2  RI    Not in Dataset  
       LOCATION.$172.AGTCITY                         DB2  
  _  LOCATION.$172.AGTZIP                           DB2  RI    Not in Dataset  
       LOCATION.$172.AGTZIPHS                        DB2  
  _  LOCATION.$172.VKTVENRQRSLOG                    DB2  RI    Not in Dataset  
       LOCATION.$172.VKTRQRSXREF                     DB2  

For each relationship, the following columns are displayed:

CMD

Enter line commands in this column. For information about commands that are valid for this screen, see Line Commands.

Parent/Dependent

Displays the name of the Db2 table defined as the parent in an RI relationship in the upper row (the row with the CMD input field). The foreign keys in the dependent table refer to this table. Table names are displayed in the format location.creator.table.

Displays the name of the Db2 table defined as the dependent in an RI relationship in the lower row. This table contains the foreign keys. Table names are displayed in the format location.creator.table.

Obj Type

Indicates the object type of the parent and dependent. For RI relationships, the object type should always be Db2.

Rel Type

Indicates the kind of relationship that exists between the corresponding parent and dependent objects.

RI

Db2-defined referential integrity.

Status

Indicates the condition of each relationship in the upper row (Status) for each relationship. If there is an error for the dependent object, it will override the Description in the lower row. The status row is blank if the relationship file is consistent with the Db2 catalog for the particular relationship. If the relationship file is not consistent with the Db2 catalog, File-AID/RDX displays one of the following messages:

Message

Explanation

Not in Dataset

Indicates that this relationship exists in the Db2 catalog, but does not exists in the relationship file specified on the RI Relationship screen. May indicate that the relationship did not exist the last time the relationship file was refreshed.

Not in DB2 Cat

Indicates that this relationship exists in the relationship but does not exist in the Db2 catalog. Indicates that the parent or dependent tables, or a foreign key has been dropped.

Out of Sync1

Indicates the relationship exists in both the relationship file and the Db2 catalog, but the timestamps on each table do not match each other. May also indicate that the columns that comprise the foreign key are inconsistent.

In addition, File-AID/RDX displays the following messages as a result of line command processing:

Deleted

Displayed after you enter the D line command. Indicates that this relationship has been deleted from the relationship file. It does not, however, indicate that the relationship has been deleted from the Db2 catalog.

Loaded

Displayed after you enter the S line command. Indicates that this relationship has been loaded into the relationship file.

Refreshed

Displayed after you enter the S line command for a relationship that had the message Out of Sync 1 displayed. Indicates that the Db2 catalog and the relationship file are now consistent with respect to this relationship.

Line Commands

The following File-AID/RDX-specific line commands are valid on this screen:

D (Delete)

(Load Option 1 only, see RI Relationship Detail Screen RI Load Option 1) Deletes an RI relationship only from the relationship file and displays the message Deleted in the Status column. Use this command to delete a relationship from the relationship file when it no longer exists in the Db2 catalog.

I (Relationship Information)

(Load Option 1 only, RI Relationship Detail Screen RI Load Option 1) If you enter the I line command on a relationship for which a message is displayed in the Status column, the RI Information window is displayed (See RI Information Screen). If you enter the I line command on a relationship for which the Status column is blank (RI already in relationship file), the Relationship Information window is displayed (See Relationship information screen).

S (Select)

Selects a relationship to be loaded or refreshed. File-AID/RDX retrieves information about the RI relationship from the Db2 catalog. If the relationship does not yet exist in the relationship file, File-AID/RDX loads the relationship and displays the message Loaded in the Status column. If the relationship does exist but is inconsistent with the Db2 catalog, File-AID/RDX uses the information from the Db2 catalog to refresh the relationship file and displays the message Refreshed in the Status column. File-AID/RDX also displays the messages Loaded and Refreshed in the Status column.

Primary Commands

The following File-AID/RDX-specific primary command is valid on this screen:

ALL

Enter the ALL command to select and load all RI relationships into the relationship file. There are no operands associated with this command.

GRAPHIC (G)

Enter the GRAPHIC command to invoke the Graphical Relationship Display screen and show RI relationships for the selected table. For more information on the Graphical Relationship Display screen, see Graphical Relationship Display. There are no operands associated with this command.

SQLID

Enter the SQLID primary command to change the current Db2 SQLID. Enter the SQLID command without an operand to change the current SQLID to match the current userid. Use the new-sqlid operand to specify any SQLID.

RI information screen

The RI Information screen is displayed when you enter the I line command on the RI Relationship Detail screen on a relationship and press Enter. This window contains detailed information about the relationship on which you invoked the I line command on the RI Relationship Detail screen.

RI Information Screen

 File-AID/RDX           Relationship Information          DB2  Row 1 to 2 of 2   
  Command ===>                                              Scroll   ===> CSR     
                                                                                 
   Parent Name:    LOCATION.FRSAMP.EMP                          Type: DB2  
                                                                                 
                                                                                 
                                                                                 
   Dependent Name: LOCATION.FRSAMP.DEPT                         Type: DB2  
                                                                                 
                                                                                 
                                                                                 
  Relationship Details:                                                           
   Description:    RI -  REP                                                     
   Status:         Not in Dataset                                                 
   Created:                                                     User:             
   Last Modified                                                User:             
  Parent Columns  /Type(Length)             Dependent Columns  /Type(Length)      
  ----------------------------------------- ------------------------------------  
  LNAME                                       REP                                 
                                                                                 
  *** End Of Columns ***                      *** End Of Columns ***   

Parent and Dependent Object Name Area

The fields in this area provide information about the parent and dependent objects.

Parent Name

Displays the name of the table defined as the parent table in an RI relationship. This table’s primary index contains values that match the foreign keys defined in the corresponding dependent table. Tables are displayed in the format location.creator.table.

Type

Indicates the object type of the parent and dependent object.

DB2

Iindicates a Db2 table.

Dependent Name

Displays the name of the table defined as the dependent table in an RI relationship. This table contains the foreign key, the values of which match the parent table’s primary index. Tables are displayed in the format location.creator.table.

Relationship Details Area

The fields in this area provide information about the relationship such as the Relationship Description, the Status of the relationship, creation and modification dates.

Description

A description of the selected relationship.

RI

The RELNAME from the Db2 catalog table, SYSIBM.SYSRELS (See Relationship Information Screen—RI relationship information).

Status

Displays the message displayed in the Status column on the RI Relationship Detail screen.

Message

Explanation

Not in Dataset

Relationship in Db2 catalog is not loaded in the relationship file.

NOT IN DB2 CAT

Relationship cannot found in the Db2 catalog.

OUT OF SYNC 1

Timestamp is inconsistent between Db2 catalog and relationship file.

Created

Displays the date and time that the relationship was created. For Db2 RI relationships it represents when it was loaded into the Db2 catalog. File-AID/RDX displays date and time in the format specified at the time of Db2 installation.

User

Displays the user ID of the person who loaded the RI relationship into the relationship file using either the initial load batch job or the Load RI option or line command.

Last Modified

Display date, time, and user ID indicating when the relationship was last modified and who modified it. File-AID/RDX displays date and time in the format specified at the time of Db2 installation.

Parent Columns

Displays the names of the columns from the parent table that are referenced by the foreign key.

Dependent Columns

Displays the names of the columns from the dependent table that comprise the foreign key.

Type(Length)

The line directly below the parent column’s name displays the column’s data type. The length of the data is displayed in parentheses immediately following the data type for CHAR, VCHAR, GRPH, VGRPH, and DEC data types only. Note that the length value only displays after the RI has been loaded into the relationship file.

Important

If the Db2 column data type is distinct (UDT), File-AID/RDX displays only the underlying built-in data type.

 

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