Using the Editor

After you select a table, Optim checks the database and the Optim™ Directory to determine if a primary key is defined for the selected table and lists columns in the Primary Key Editor:

primary key editor, described below

Base Creator ID

If a generic primary key applies to the table, the Creator ID of the base table is displayed. If you select an explicit primary key, the box is blank and protected.

Description

Description of the content or purpose of the Optim primary key (up to 40 characters). You can modify this description for primary keys.

Type

Type of primary key: Optim (explicit), Generic, or specific DBMS (for example, Oracle).

Key Columns

List of columns in the primary key, in priority order.

Column Name
Name of each column in the primary key.
Data Type
Attributes of each column in the primary key.

To create or modify a primary key, drag column names between the Available Columns box and the Key Columns box. You can also drag column names to arrange the Key Columns in priority order. You cannot create a Primary Key using an SQL Variant column.

To remove columns from the Key Columns box, right-click to open a shortcut menu and select Remove or Remove All. You can also drag column names from the Key Columns box to the Available Columns box.

Available Columns

Columns that are available to be included in the primary key. Columns currently included in the primary key are not listed. Initially, the columns are listed in the order that they are defined in the database.

Column Name
Names of the available columns in the table.
Data Type
Attributes of each available column.
Note: Large Object (LOB) and SQL variant columns are not available for use as primary key columns.

Menu Commands

In addition to the standard File, Edit, and Tools menu commands, you can select the following commands from the Tools menu in the Primary Key Editor:

Generic
Convert a primary key to a generic primary key.
Indexes
Open the List Unique Indexes dialog to create or modify a primary key using a unique index.
Modify Base Table
Open the Respecify Base Table Creator ID dialog to change the Creator ID for the base table associated with the generic primary key.
Note: This command is enabled for generic primary keys. Select this command if the base table used to create the generic primary key is no longer identical to the other tables that use the generic primary key.