Rules applied when mapping primitive types from a physical data model to a development model
A number of mapping rules are applied when importing primitive types from the physical data model to an MDM development model.
The following table shows the set of predefined SQL types with which the physical data model works, as well as the primitive types that each can be associated with. The SQL types for IBM® DB2® are also shown to help illustrate the mapping.
Length, precision, and scale are copied into the development model where possible.
User defined types are handled by first resolving them to a predefined SQL type, and then applying the rules in the table.
| Physical data model (dbm) | DB2 type and matching physical data model primitive type | Development model module (mdmxmi) |
|---|---|---|
| BinaryStringDataType (length) |
BigInt: BIGINT | LONG |
| BinaryStringDataType (length) |
CharForBitData: BINARY
LongVarcharForBitData: BINARY_VARYING VarcharForBitData: BINARY_VARYING Blob: BINARY_LARGE_OBJECT |
STRING |
| BooleanDataType | None: BOOLEAN | BOOLEAN |
| CharacterStringDataType (length) |
Char: CHARACTER
Varchar: CHARACTER_VARYING Clob: CHARACTER_LARGE_OBJECT Graphic: NATIONAL_CHARACTER LongVargraphic: NATIONAL_CHARACTER_VARYING Vargraphic: NATIONAL_CHARACTER_VARYING DBClob: NATIONAL_CHARACTER_LARGE_OBJECT |
STRING |
| DataLinkDataType (length) |
DataLink: DATALINK | STRING |
| DateDataType | Date: DATE | DATE |
| IntervalDataType | None: INTERVAL | STRING |
| NumberDataType | [supported by Oracle with max precision = 38 and max scale = 127] | BIG_DECIMAL |
| ApproximateNumericDataType (precision) |
DECFloat: FLOAT
Float: FLOAT |
BIG_DECIMAL |
| ApproximateNumericDataType (precision) |
Double: DOUBLE_PRECISION | DOUBLE |
| ApproximateNumericDataType (precision) |
Real: REAL | FLOAT |
| FixedPrecisionDataType (precision scale) |
Decimal: DECIMAL
Numeric: NUMERIC |
BIG_DECIMAL |
| IntegerDataType (precision scale) |
Integer: INTEGER | INTEGER |
| IntegerDataType (precision scale) |
SmallInt: SMALLINT | SMALL_INT |
| IntegerDataType (precision scale) |
BigInt: BIGINT | LONG |
| TimeDataType | Time: TIME | STRING |
| TimeDataType | Timestamp: TIMESTAMP | TIME_STAMP |
| XMLDataType | Xml: XML_TYPE | STRING |