Open Database Connectivity
Expert – Computing
Reading Time – 1 minute, 30 seconds
Open Database Connectivity (ODBC) is an application programming interface (API) developed by Microsoft. ODBC is often referred to as a database driver or ODBC driver which is a dynamic link library (DLL) in windows and shared objects on Linux/UNIX. Sometimes it is called an open database connector. ODBC is used to access database management systems (DBMS) independent of the operating systems and the type of DBMS. It is also language-independent, which means client applications developed in any programming language can utilize the API to connect to DBMS.
Each database system has its own ODBC driver hence why, it is called ‘open’. For example, large database systems such as Oracle, MySQL, SQL Server, and Hive have their own drivers which can be downloaded from their official sites. Non-windows, java-based applications use JDBC (Java Database Connectivity) similar to ODBC, which defines how the client application developed in java should access a database.
Open database connectivity allows a variety of client applications developed in different languages to connect to a given DBMS at a time and vice versa, a single application can access different DBMS permitting maximum interoperability. ODBC is associated with the database system and not with the application that accesses it.
When developing a client application to access DBMS using ODBC, in addition to the ODBC driver, you will need to install specific packages or libraries in the language environment. For example, pyodbc package for python, RODBC library for R and System.Data.Odbc library for C# applications.
Open database connectivity driver interface defines many functions that can be categorized by the following tasks.
- Connect the application to the data source
- Receive data source and driver information
- Prepare and submit SQL requests
- Retrieve results and its information
- Receive information about data source’s system tables
- Terminate statements and connections when required
- Set driver attributes and descriptor fields
- Retrieve driver attributes and descriptor fields