キー制約の表示

www.altova.com このトピックを印刷 前のページ 1つ上のレベル 次のページ

ホーム >  データベース構造の探索と変更 > テーブル構造の表示 >

キー制約の表示

When you expand the Keys sections, the キー制約 that have been defined for the table are displayed in such a way that each column forming part of a particular key is shown in a row of its own. For 外部キー, there is an additional column where the column that is referenced in another table is displayed.

design_keys

The type of a キー制約 is indicated with icons. The following icons are used:

 

ic_primary-key-constraints

主キー

This constraint is the primary key of the table. The primary key ensures that no duplicate data and no NULL values can be inserted into the 個々の column(s). Only one primary key is allowed in a table.

ic_unique-key-constraint

一意キー

This constraint makes sure that the values entered in a specific column not participating in a primary key are unique. Multiple 一意キー can be defined on a table and the NULL value is allowed in the 個々の table(s). Note, however, that the value NULL can only occur once per column. A 一意キー can be referenced by a 外部キー.

ic_foreign-key-constraint

外部キー

This constraint creates a 外部キー relation where the primary or 一意キー of a table is referenced by a column in a different table. The primary key column or 一意キー column, 個々のly, in the first table is used as a 外部キー in the 参照する列 of the second table. This way, the 外部キー ensures that only data that is present in the primary or 一意キー column of the first table can be inserted into the second table.

 

You can rename a キー制約, change, add, or remove columns, or modify the reference of a 外部キー directly in the table design.

 

To view the properties of a キー制約 in detail, select a キー制約 and view the properties in プロパティウィンドウ.


(C) 2019 Altova GmbH