Is Interoperability Achievable with ODBC?: Slide 8 of 10.


Click slide for next, or goto previous, first, last slides or back to thumbnail layout.

Click slide for next, or goto previous, or back to thumbnail layout.
To overcome the troubles with ODBC types, database types, and application types, we propose a generic mapping mechanism.
An interoperable program should only use ODBC types. The mapping of these types to specific database types (e.g. to MS Access types) should ideally be transparent and hidden in the ODBC driver manager. Since this is not the case we added the mapping as a small set of functions.
The main part of the mapping is to determine the database type that best corresponds to the ODBC type. Additionally the so-called creation parameters have to be considered as they also vary. Creation parameters describe how long a string of characters may be or what is the precision of an integer number?
In this figure we show, how ODBC types can be emulated if they are not supported by the database. An arrow means that the data type pointed to can be used instead of the other data type.
Without loss of information it is possible to use Integer instead of SmallInt if SmallInt is not available (we usually call this arithmetic promotion). It is also possible to convert a number into a string of characters if the data type were not available. Since SmallInt and Integer can be emulated with Numeric and vice versa (if the specified precision does not exceed the range of SmallInt or Integer), the resulting structure contains cycles.