Default type maps of the UML to SQL (Generic / Oracle) transformations remap the types that are commonly used in the UML modeling domain (such as String) into types that are suitable for SQL domain (such as varchar).
UML to SQL Type Map
The default type map for these transformations is stored in the UML to SQL Type Map profile and automatically gets attached to your project at the 3rd step (the type mapping step) of the transformation wizard. If necessary it can be changed.
The Default map carries the following type conversions.
Source Type | Result Type |
---|---|
String | varchar (default) varchar2 char varying character varying nvarchar nvarchar2 nchar varying national char varying national character varying longvarchar long varchar char character nchar national char national character long char |
short | smallint |
long | number(20) |
Integer | integer |
int | int |
float | float |
double | double precision |
date | date |
char | char(default) character nchar national char national character |
byte | number(3) |
boolean | number(1) |
If you have a situation when one type map imports another type map, you can specify another default mapping rule. Such situation appears, for example, in the Oracle type map, inheriting from the Standard type map where the Oracle mapping rule String-->varchar2 overrides the base mapping rule String-->varchar. For more information about the type mapping, see Transformation Type Mapping and Controlling Type Mapping Rule Behavior in MagicDraw User Guide.
Note
This feature is available with MagicDraw 18.0 SP1 or later.