The ODBC Broker is a C++ class built on top of ODBC Layer. It
encapsulates much of the complexity of the ODBC API and provides a uniform interface to
The Database broker class is a higher abstraction of a group of classes developed via
the raw ODBC APIs. It is capable of handling dynamic query, batch SQL commands, database
caching, and runtime binding.
In application development using ODBC, developers usually define C/C++ variables
that match whats in the database table (static binding). The approach assumes the
database tables are defined before the corresponding database classes. There are couple of
problems with the approach:
- New classes have to be designed when new tables are introduced into the system. There is
a lot of redundant development of database classes but lack of higher abstraction.
Such a system grows as the number of database table increases.
- Any changes in the database schema (i.e., change the data type or size of a column) lead
to modifications of the database classes. This process involves not only
and re-linking the application, but also lengthy testing. The system becomes
The Database Broker is designed to solve such problems. It can processes any ANSI SQL
statements supported by the ODBC driver, and perform runtime binding for result sets.
Users of the ODBC broker do not need to know the details of the ODBC operation.