Defining a primary key constraint definition
Print
- Last Updated: March 30, 2020
- 2 minute read
- OpenEdge
- Version 12.2
- Documentation
The following procedure describes how to define a primary key constraint definition.
To define a primary key constraint definition:
- Start Data Administration and connect to the OpenEdge database you are migrating.
- Select DataServer > ORACLE Utilities > Server Attributes > View/Maintain Foreign Constraints. The View/Maintain Foreign Constraints dialog box appears.
-
Select the table for which you are defining a primary
key constraint definition and click Create Constraints.
The Create Foreign Constraint Definition for tablename dialog
box appears, as shown in the following figure .
Figure 1. Create Foreign Constraint Definition for tablename dialog box 
- Accept the default constraint definition name, or enter a new one.
-
Select an index for the primary key constraint definition. Only
indexes with an I in the All Columns
Mandatory column are recommended for the primary key
constraint definition. As long a column is unique, you can select
as the primary constraint. Note, however, that the columns designated
as the primary constraint are migrated as
NOT NULLcapable. That is, if you store many records in your OpenEdge database with the unknown value, they cannot be migrated to the foreign data source, given the defined primary constraint on that server object. - By default, the primary key constraint definition has the Active check box checked. Leave this box checked if you want the constraint definition you are defining to be available for migration.
- Optionally, add a description of the constraint definition in the Description box.
-
Click OK to save the constraint
definition and exit the dialog box. Click Create to save
the constraint definition and remain in the dialog box to define more
constraints for the selected table.
If the primary constraint definition is incorrectly defined, a message is displayed and the constraint definition is not created.
The system fails to generate a constraint definition when an index is not defined as unique by the presence of either an OpenEdge unique attribute (indicated by an I) or by a unique constraint definition (indicated by a C) in the Unique column.