Login | Register
My pages Projects Community openCollabNet


The mapping between UML and Relational is done according to the following:

TableClass (stereotype <<Table>> is optional)
Primary/Foreign key Attribute of special stereotype (<<PK>>, <<FK>>)
Attribute propertiesAttribute properties, special stereotypes (see below)

Modelling Foreign Keys

For modelling foreign keys it is not enough to just let an attribute be of the stereotype <<FK>>. It must also be specified what table and what column this foreign key refers to. This might be done using tagged values whereas source column and association name should be used. The association a foreign key belongs to needs to be specified because if there exist more than one relationship between two tables it cannot be determined which foreign key belongs to which relationship.

Attribute mapping

Special attribute properties will be mapped this way:

NULL / NOT NULLIf an attribute should be NOT NULL, let the attribute be of stereotype <<NOT NULL>>. The stereotype <<NULL>> is not needed on every attribute that is nullable, so the attribute is nullable if it is not <<NOT NULL>>.

The 'default value' property is supported directly.

This mapping is based on: Scott W. Ambler, A UML Profile for Data Modeling
This page was last modified by $Author: linus $ on $Date: 2010-01-12 11:21:38 -0800 (Tue, 12 Jan 2010) $.