Composite Key (Entity-Relationship Diagram)

A composite key is a type of key that consists of two or more attributes.

A composite key is a type of key that consists of two or more attributes. The combination of specified attributes uniquely identifies the instance of the entity (in relational databases, a row in a table). The composite keys are often composed of natural key attributes.

Example of Composite Key

The example below shows a Cell entity with a composite key that consists of Row and Column attributes. Row and column index uniquely specify a cell of a table.

Composite key of entity (Entity-Relationship Diagram)
Composite key of entity (Entity-Relationship Diagram)

How to Create a Composite Key

If you want to create a composite primary key using Software Ideas Modeler, just mark multiple attributes as primary keys. You can do it for each attribute separately or select all the attributes of the composite key and mark them as the primary key.

To mark an attribute as a primary key, right-click on the attribute and choose the Primary key from the context menu.

New Comment

Comment