Open Database Connectivity – ODBC
Open Database Connectivity (ODBC) is a standard application programming interface (API) for accessing database management systems.
- ODBC calls are independent of database systems and operating systems.
- ODBC based applications can be ported to other platforms, both on the client and server side, with few changes to the data access calls.
- ODBC achieves DBMS independence by using an ODBC driver as a translation layer between the application and the database.
- The application uses ODBC functions through an ODBC driver manager with which it is linked, and the driver passes the query to the DBMS.
- An ODBC driver provides a standard set of functions for the application to use, and implementing DBMS-specific functionality.
- An application that can use ODBC is referred to as “ODBC-compliant”. Any ODBC-compliant application can access any DBMS for which a driver is installed.
- Drivers are being used for all major databases, data sources like address book systems, Microsoft Excel, and even for text or comma-separated values (CSV) files.
- ODBC remains largely universal today, with drivers available for most platforms and most databases. It is not uncommon to find ODBC drivers for database engines that are meant to be embedded, like SQLite.
For our data systems we need to write a driver manager and a driver. The flow of information from client to database is
Client -> Driver Manager -> Driver -> Database System ->Result ->Database System ->Driver -> Driver Manager -> Client
Popular driver managers are unixODBC and iODBC driver manager. After creating the database system, we need to use these libraries along with driver manager libraries for creating the driver.
Thin client computing using XML as an intermediate format has reduced the need for ODBC. Many web development platforms contain direct links to target databases – MySQL being very common. In these scenarios, there is no direct client-side access nor multiple client software systems to support; everything goes through the programmer-supplied XML application.