Default reverse data type mappings
For most data sources, the default type mappings are in the wrappers.
The two kinds of mappings between data source data types and federated database data types are forward type mappings and reverse type mappings. In a forward type mapping, the mapping is from a remote type to a comparable local type. The other type of mapping is a reverse type mapping, which is used with transparent DDL to create or modify remote tables.
The default type mappings for Db2® family data sources are in the DRDA wrapper. The default type mappings for Informix® are in the INFORMIX wrapper, and so forth.
When you define a remote table or view to the federated database, the definition includes a reverse type mapping. The mapping is from a local federated database data type for each column, and the corresponding remote data type. For example, there is a default reverse type mapping in which the local type REAL points to the Informix type SMALLFLOAT.
Federated databases do not support mappings for LONG VARCHAR, LONG VARGRAPHIC, and user-defined types.
When you use the CREATE TABLE statement to create a remote table, you specify the local data types you want to include in the remote table. These default reverse type mappings will assign corresponding remote types to these columns. For example, suppose that you use the CREATE TABLE statement to define an Informix table with a column C2. You specify BIGINT as the data type for C2 in the statement. The default reverse type mapping of BIGINT depends on which version of Informix you are creating the table on. The mapping for C2 in the Informix table will be to DECIMAL in Informix Version 8 and to INT8 in Informix Version 9.
You can override a default reverse type mapping, or create a new reverse type mapping with the CREATE TYPE MAPPING statement.
The following tables show the default reverse mappings between federated database local data types and remote data source data types.
These mappings are valid with all the supported versions, unless otherwise noted.