Relationships

Relationships are represented by associations in UML. The following paragraphs will describe the way of relation generation.

1:1

Keys are imported in the association direction.

Nullability is driven by multiplicity. (if multiplicity is 0..1 - 1 then foreing keys are nullable).

1:N

Keys are imported on the N side.

Nullability is driven by multiplicity. (if multiplicity is 0..1 - N then foreing keys are nullable).

Composition

If association is composition then foreing keys becomes a part of primary key columns. They are not nullable.

M:N

An mapping table is created from this association. The table name equals to the association name. The primary key columns are imported from related tables.

Associative relationship

Associative entity is not allowed to have own primary key columns. All columns are imported from master entities.

N-ary associations

An table is derived from this association. The table name equals the association name. Primary key is composed of imported columns.

Generalisation

Primary key columns of super-type are imported to sub-type and become the primary key. The column names are the same.