Database relationships
Perspective | ARCAD Observer |
Access | Server > Applications > Application Name > Repository |
ARCAD Observer gives you a detailed overview of all the database relationships of your applications. Create automatically diagrams of the database relationships, and use them to document your application.
Before working with database relationships in ARCAD Observer, you need to run commands to be able to calculate the database relationships of your application.
In the ARCAD 5250 emulator or in the command feature or the RDi remote system perspective, run the following ARCAD commands:
- The AUPDPFKEY command is used to generate primary keys that will be used to calculate the database relationships.
- The AUPDFLDDBR command is used to generate database links at the field level.
For more information about specific commands for ARCAD Observer, refer to Other features.
By default, the Database relationships view display the 1000 first database relationships. Click the More... button to display the next 1000 database relationships.
Click the Refresh selected or Refresh all icons to refresh the database relationship view with the latest version of the items.
To refine the list of database relationships displayed, use multiple filters using the Search Parameters dialog.
Select the Query Environment from the drop-down list to refine the search to a specific environment.
- *LASTPRD
- The last level used to transfer the application to production.
- *LAST
- The last level used to update the cross-references for each component.
- Version number
- Define a specific level to use.
Click the Search icon to display the Search Parameters dialog.
Enter all or part of a database relationship's attribute, then click OK.
Use "*" to get all possible values in a field.
- Source
- Table Filter the components linked to a particular source table. Enter all or part of a table's name.
- Source Application
- Filter the components linked to a particular source application. Enter all or part of an application's name.
- Referenced Table
- Filter the components linked to a particular referenced table. Enter all or part of a table's name.
- Application of the referenced table
- Filter the components linked to a particular application containing a referenced table. Enter all or part of an application's name.
- Display suspended links
- Tick to display links that are suspended.
- Source or referenced table
- Tick to search both source or referenced table with the defined search parameters.
- Upper/Lowercase detection
- Tick to take word case into account for the search.
Follow the subsequent steps to display the selected procedure’s properties.
Step 1 Right click on the database relationship item in the view and select Properties > Source table or Referenced table in the contextual menu.
Result A dialog will open and show the database relationship’s properties.
Depending on the property selection, this section shows the source or referenced table's properties.
- General
- This section shows the source or referenced table's properties.
- Functional Description
- This section shows the source or referenced table's functional description.
- Homonyms
- Shows the list of homonyms in the whole repository.
- Functional Tree
- Shows a tree displaying the branches of the functional tree to which the table belongs. The node marked with a red M represents the main tree.
- Application variable
- Shows the list of application variables.
- Table Fields
- [Only available for tables] Shows the list of table fields.
- Table Relationships
- [Only available for tables] Shows the list of table relationships.
- Table Potential Primary Keys
- [Only available for tables] Shows the list of table potential primary keys.
- XRef Levels
- Shows the source or referenced table's cross-reference level.
You can modify the primary keys from this dialog. Enter your modifications in the Table Potential Primary Keys tab.
Click OK to save your modifications or Cancel to cancel.
The majority of cross-references is automatically calculated by the ARCAD, however you may wish to manually create a link between components.
Follow the subsequent steps to create manually a database relationship between components.
Step 1 To create a database relationship, click the Create icon in the database relationship view.
The Database Relationship editor opens.
Step 2 Enter a Name for the database relationship in the Identification section.
Step 3 Select the Relevance level by entering a relevance level number or selecting it with the increment selector. By default, the relevance level is set to 9.
Step 4 In the Tables section, select an Application in the drop-down list for the source and referenced tables.
- Click the Browse icon to select a table.
- Enter all or parts of the name in the Table field of the table selector dialog. A list of tables is displayed.
- Click to select the table then click OK.
Step 5 Select the unique key in the drop-down list of the Fields tab.
Step 6 Define the relationship condition. Enter the relationship condition in the Fields tab.
Step 7 Enter a description in the Description tab.
Step 8 Save the changes (, Ctrl+S
or File > Save).
Result The database relationship is created.
Existing database relationship can be modified. To edit a database relationship, right-click on the item in the database relationship view and select Edit Database Relationship in the contextual menu.
The Database Relationship editor opens. Not all fields can be edited for the database relationships calculated by ARCAD. Only the database relationships created manually can be entirely edited.
To suspend a database relationship, right-click on the item in the database relationship view and select Suspend / Release relationship.
To release the database relationship, right-click on the item in the database relationship view and select again Suspend / Release relationship.
For more information about generating diagrams, refer to Diagrams.
Deleted database relationship cannot be accessed or recovered. You need to recreate the relationship manually if needed.
To delete a database relationship, right-click on the item in the database relationship view and select Delete. Click OK in the dialog to confirm or click Cancel to keep the database relationship.