Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Database Keys

Two types of key are used to access Tables in a relational database: Primary Keys and Foreign Keys.

·A Primary Key uniquely identifies a record in a Table
·A Foreign Key accesses data in some other related Table via its Primary Key

 

In Enterprise Architect, Primary Keys and Foreign Keys are represented by labels on the column attributes and by stereotyped operations.

Example

This example shows a data model that includes both Primary Key and Foreign Key columns.

A Physical data model defined using a UML Profile that includes Primary and Foreign Keys

A Physical data model defined using a UML Profile that includes Primary and Foreign Keys

 

In each Table, one of the columns is designated as the Primary Key, as indicated by the PK label beside the column, with a corresponding Primary Key operation. Foreign Keys are denoted by the FK label and have a corresponding Foreign Key operation.

The Association connector that defines the Foreign Key relationship between SalesPerson and Customer uses the Information Engineering notation; this is the default of the three notations that Enterprise Architect supports to help Data Modelers distinguish cardinality in relationships. The other two notations are:

·IDEF1X notation
·UML 2.1 notation

 

Learn more

?>