Manage Generic Relationships

Some databases contain sets of tables that are identical except for the Creator ID. Rather than define a relationship for each set of tables, you can define a generic relationship that applies for all sets of tables that have the same base name, regardless of the Creator ID.

You can:

Note: The Creator ID of the parent and child tables used to create the generic relationship must be the same.

Convert to a Generic Relationship

To convert a database relationship or explicit Optim relationship to a generic relationship, select an existing relationship or select parent and child tables for a new relationship and open the Relationship Editor.

On the Tools menu, select Generic. (The Creator ID for parent and child tables must be the same to enable this option.) If the relationship is defined to the database, there are no additional prompts.

If you select an Optim relationship, a prompt asks whether to retain or delete the original explicit relationship. If you choose to retain the original, changes to the generic relationship have no effect on it.

When you convert a relationship to generic, the Relationship Editor displays the Creator ID of the explicit relationship as the Base Creator ID. The relationship is Untitled until you save the generic relationship. After you save a generic relationship, the Creator ID portion of the relationship name is replaced with an asterisk ( * ), for example, dbalias.*.tablename constraint.

Respecify the Base Table Creator ID

You can use a generic relationship for any pair of identical tables that have a different Creator ID. If the base tables used to define the generic relationship change, you can respecify the Creator ID.

In the Relationship Editor, select Modify Base Table from the Tools menu to display the Respecify Base Table Creator ID dialog:

panel used to respecify base table creator ID, described below

Parent Table

Name of the parent table used to create the generic relationship.

Child Table

Name of the child table used to create the generic relationship.

Creator ID

Enter a different Creator ID, or click the down arrow to select from a list of Creator IDs. The specified Creator ID must be valid for both tables.

Note: Your selection appears as the Base Creator ID in the Relationship Editor. You may then save the generic relationship.

Confirm Option

By default, you are prompted to confirm before deleting a definition. To disable this feature, select Personal from the Options menu in the main window. See Personal Options for more information.