CHAPTER 3 Managing the Database
DataWindow Designer User’s Guide 77
• 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 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.
Completing the primary key
Some DBMSs automatically create a unique index when you define a primary
key so that you can immediately begin to add data to the table. Others require
you to create a unique index separately to support the primary key before
populating the table with data.
To find out what your DBMS does, see your DBMS documentation.