Data type mappings in a federated system

The data types at a data source must map to corresponding database data types. This mapping enables the federated server to retrieve data from the data source.

The federated database supplies a set of default data type mappings for some data sources. For other data sources you must provide the data type mappings that you want to use. For nonrelational data sources, you cannot override the existing data type mappings or create new mappings.

Some examples of default data type mappings are:
  • The Oracle type FLOAT maps by default to the data type DOUBLE
  • The Oracle type DATE maps by default to the data type TIMESTAMP
  • The Db2® for z/OS® type DATE maps by default to the data type DATE

Nicknames that are created after a mapping is changed use the new type mapping. Nicknames that are created before the mapping is changed use the default data type mapping.

If you already created the nicknames, you can update the existing nicknames in one of the following ways:
  • You can alter each nickname
  • You can drop and re-create each nickname
Federated database servers do not support mappings for the following data types:
  • The local data type cannot be LONG VARCHAR, LONG VARGRAPHIC, or a user-defined data type.
  • The remote data type cannot be a user-defined type.

    However, you can use a cast function to convert the user-defined data type in a view at the remote data source to a built-in or system data type. You can then create a nickname for the view. For most data sources, if you create such views, the views have no statistics or indexes and you cannot update the views.