Relationships are represented by associations in UML. The following paragraphs will describe the way of relation generation.
Keys are imported in the association direction.
Nullability is driven by multiplicity. (if multiplicity is 0..1 - 1 then foreing keys are nullable).
Keys are imported on the N side.
Nullability is driven by multiplicity. (if multiplicity is 0..1 - N then foreing keys are nullable).
If association is composition then foreing keys becomes a part of primary key columns. They are not nullable.
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 entity is not allowed to have own primary key columns. All columns are imported from master entities.
An table is derived from this association. The table name equals the association name. Primary key is composed of imported columns.