Working with Optim relationships

Optim™ uses relationships to determine the data to be retrieved from related tables and relies upon relationships defined to the database, when available. However, you can also define Optim relationships to supplement relationships in the database.

With Optim relationships, a number of the database restrictions are relaxed. For example:

The more flexible Optim relationships are called “extended” relationships. Extended relationships can replicate implicit or application-managed relationships in your database, allowing you to manipulate sets of relational data in the same manner as in your production environment.

In addition, an Optim relationship can be stored in the Optim Directory as:

Generic relationships are useful when several sets of tables differ only by Creator ID. (For example, in a test environment, each programmer may use a separate copy of the same production tables. Each set of tables can be distinguished by the Creator ID.) Using generic relationships, you define one set of relationships that applies to all sets of tables. Also, when a set of these tables is added, the generic relationships automatically apply.

Restrictions

Although the rules for creating Optim relationships are more flexible than the rules for creating database-defined relationships, there are some restrictions:

In a Relationship definition for a multi-byte or Unicode database:

EXAMPLES:

Parent Supported/Not Supported Child Description
CHAR
supported
CHAR Supported, semantics must match
NCHAR
supported
NCHAR Supported, semantics irrelevant.
CHAR
not supported
NCHAR Not Supported
CHAR
supported
VARCHAR Supported, semantics must match.
NCHAR
supported
NVARCHAR Supported, semantics irrelevant.
CHAR||NCHAR
supported
NCHAR||CHAR Supported, if character semantics; not supported if byte semantics.
CHAR||NCHAR
supported
NCHAR||NCHAR Supported, if character semantics; not supported if byte semantics.


Feedback