Class attributes are used as columns in tables.
Primary key columns are attributes, which have a mark star (*). XMI contains tagged value key and value 1.
Foreign keys are not listed in class attributes. System automatically recognizes foreign keys from associations. It is required to enter foreign keys in the UML model as role names on the side of master table (class). If foreign key is composed of more than one colum than column names in the role name are separated by bar (|).
Let us assume that table boss have primary key composed of 2 columns - firstN and lastN. This key is imported to the table slave and it is required to name it as boss_firstN and boss_lastN then role on the boss side has a name boss_firstN|boss_lastN.
It is possible to enter an abbreviated version of the foreign key columns in the role property named 'abbreviation'. The rules are the same as for standard role name. If abbreviation is used then role name can contain some logical name of the role instead of the imported column names.
Primitive types are modeled as base object or dadtabase types. In the XMI export they are tagged as DataType. Generator then transforms such types into syntax required by target database.
If type is parametrized - mostly the length, then this paramter should be enclosed in square brackets. eg. varchar[10] will be converted to varchar(10) and numeric[10][3] will be converted tonumeric(10,3).
If no type is specified then warning is generated and column will have the type of varchar[20].
The common practise is to define user-defined types. Using these types ensueres the proper database schema generation for several target database without logical model or physical model change.
The user-defined types is modeled as a class with stereotype typedef. Such a class has just one attribute. Use just underscore as an attribute name.
Created used-defined type is used in the model instead of the standard primitive type.
The structured type is modeled as a class with stereotype typedef.
Structured types can be recursively nested.
Column name are equal to attribute names. If attribute abbreviation is defined then it is used as a column name and attribute name is use as a comment in the generated SQL script.
The name of the column derived from the structured type is a concatenation of the attribute name and attribute name in the structured type. This algorithm is applied recursively.
All columns are not nullable by default. To set column nullability it is necessary to check the "nullable" property of the column.
To set column or table CHECK it is necessary to fill in Constraint property.
It is possible to use column or table pseudo-name and substitute it during a script generation.
To use this feature you have to use ~~currfield or ~~currtab instead of real column or table name.