Specifications
CHAPTER 3 Managing the Database
Users Guide 99
Defining primary keys
If your DBMS supports primary keys, you can define them in InfoMaker.
❖ To create a primary key:
1 Do one of the following:
• Highlight the table for which you want to create a primary key and
click the Create Primary Key drop-down toolbar button in
PainterBar1.
• Select Object>Insert>Primary Key from the main menu or
New>Primary Key from the pop-up menu.
• Expand the table’s tree view, right-click Primary Key, and select New
Primary Key from the pop-up menu.
The Primary Key properties display in the Object Details view.
2 Select one or more columns for the primary key.
Columns that are allowed in a primary key
Only a column that does not allow null values can be included as a column
in a primary key definition. If you choose a column that allows null values,
you get a DBMS error when you save the table. In DBMSs that allow
rollback for Data Definition Language (DDL), the table definition is rolled
back. In DBMSs that do not allow rollback for DDL, the Database painter
is refreshed with the current definition of the table.
3 Specify any information required by your DBMS.
Naming a primary key
Some DBMSs allow you to name a primary key and specify whether it is
clustered or not clustered. For these DBMSs, the Primary Key property
page has a way to specify these properties.
For DBMS-specific information, see your DBMS documentation.
4 Right-click on the Object Details view and select Save Changes from the
pop-up menu.
Any changes you made in the view are immediately saved to the table
definition.