Chapter 3 Building Physical Diagrams


Defining keys in a physical diagram

A key is a column, or a combination of columns, that uniquely identifies a row in a table. Each key can generate a unique index or a unique constraint in a target database.

The physical diagram supports the following types of keys:

Key Description
Primary Column or combination of columns whose values uniquely identify every row in a table. A table can have only one primary key
Alternate Column or combination of columns (not the same column or combination of columns as for a primary key) whose values uniquely identify every row in a table
Foreign Column or combination of columns whose values are required to match a primary key, or alternate key, in some other table

Example

The TITLE table shown below has a primary, alternate and foreign key:

The TITLE table also contains the foreign key column PUBLISHER ID. This column references the primary key column in the Publisher table.


 


Copyright (C) 2005. Sybase Inc. All rights reserved.