IBM Database Add-Ins for Visual Studio  

Keys, Designer

In the Keys view of the IBM® Table Designer, you define the primary, unique, and foreign keys for the IBM database table.


List of Keys
In this section, you add the primary, unique, and foreign keys for the table and set their properties.
Keys
Shows the primary, unique, and foreign keys in the table.
Key Properties
In this list you can specify or change the property values of the key that is selected in the Keys list. An unavailable property is a limitation of the database that you are using.

Select a property to see its description in the box under the properties list. If the description exceeds the size of the box, hover the mouse pointer over the last line of text in the box. After a brief pause, the full description is shown in a ScreenTip.

Primary, Unique Key Definition
In this section, you select the columns for the primary key and one or more unique keys for the table.

A primary key is a column or combination of columns that uniquely identifies a row in a table. The columns of a primary key cannot contain null values. A unique key is a key that is constrained so that no two of its values are equal. The columns of a unique key cannot contain null values.
Available Columns
Shows the columns that you can include in the primary or unique key that is selected in the Keys list. To move a column to the Selected Columns list, select its name and then click the right arrow button.
Selected Columns
Shows the columns that define the primary or unique key that is selected in the Keys list. To remove a column from the list, select the column and then click the left arrow button.
Foreign Key Definition
In this section, you define one or more foreign keys for the table. A foreign key is a column or set of columns whose values are required to match at least one primary key value in another table.
For a DB2 database Table schema name
Select the schema that contains the table that you want to use for the foreign key.
For an IDS database Table owner name
Specify the user ID of the owner of the table that you selected.
Table name
Select the table for the foreign key.
Parent Table Primary Keys
Lists the primary keys for the table that you selected.
Foreign Key Columns
Lists the foreign keys that you specified.
For a DB2 database For an IDS database On delete
Specifies what action is to take place on the dependent table when a row of the parent table is deleted.
For a DB2 database On update
Specifies what action is to take place on the dependent table when a row of the parent table is updated.

See Also

IBM Table Designer | Developing IBM Database Tables | Managing Procedures, Functions, and Objects


.NET Development Forum   DB2 FAQs   IDS FAQs

© Copyright IBM Corporation 2002, 2019. All Rights Reserved.