Chapter 6. ODBC Interface

ODBC (Open Database Connectivity) is a standardized API that can be used to access data stored in various database management systems (DBMSs). It provides a product-neutral interface between front-end applications and database servers, enabling a developer to write applications that are transportable between database servers from different vendors.

ODBC inserts a middle layer, called a database driver, between an application and the DBMS. The purpose of this layer is to enable access to the database backends and to translate the data queries and commands in an application into commands that the DBMS understands. In order to achieve these goals, both the application and the DBMS must be capable of issuing ODBC commands and the DBMS must be capable of responding to them. Once an ODBC application is written, it should be able to connect to any backend database by using the appropriate ODBC driver, regardless of the vendor, as long as the database schema is the same.

The ODBC Driver

As Red Hat Database (RHDB) is powered by PostgreSQL, it comes with psqlODBC, the PostgreSQL ODBC 2.5 driver. The psqlODBC driver has been modified from the source code for PostODBC, the ODBC driver developed for Postgres95, and is distributed under the terms and conditions of the GNU Library General Public License. There are other open source ODBC drivers available for Linux. For more information on downloading and building other ODBC drivers, visit the ODBC home page for PostgreSQL at: http://odbc.postgresql.org