Defining New Primitive Types
New primitive types can be defined using a class diagram.
Depending on whether classes have been organized into packages, the class diagram can describe:
• A reference database.
• The package of reference types.
You can define your own primitive types by declaring them as subclasses of the standard primitive types, as shown in the example below:
The primitive types defined as subclasses will automatically inherit the characteristics of their superclass. In particular, the datatype conversion rule for the superclass is applied to the subclass.
It is possible to specify a length and a number of decimal places for the subclass. These will be taken into account when generating the data types if they were not already defined for the superclass.
Inheritance can occur at several levels.
In the following example, the primitive type “ZipCode” is a specialization of the “Numeric5” type of length 5, which is itself a specialization of the standard type “P-Numeric”.
If the new primitive type is not defined directly or indirectly as a subclass of a standard primitive type, the conversion table that maps primitive types to column data types must be updated.

A connection can also be directly defined between a type and the corresponding SQL datatype generated for each target DBMS without using the inheritance mechanism (see "Mappings between Pivot Types and Datatypes" in the
HOPEX Database Builder guide).