Open Database Connectivity
Encyclopedia
In computing
Computing
Computing is usually defined as the activity of using and improving computer hardware and software. It is the computer-specific part of information technology...

, ODBC (Open Database Connectivity) is a standard C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 interface for accessing database management system
Database management system
A database management system is a software package with computer programs that control the creation, maintenance, and use of a database. It allows organizations to conveniently develop databases for various applications by database administrators and other specialists. A database is an integrated...

s (DBMS). The designers of ODBC aimed to make it independent of database systems and operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s. An application can use ODBC to query data from a DBMS, regardless of the operating system or DBMS it uses.

ODBC accomplishes DBMS independence by using an ODBC driver as a translation layer between the application and the DBMS. The application uses ODBC functions, and the driver passes the query to the DBMS.

Overview

ODBC defines a standard C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

  API
Application programming interface
An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...

 for accessing a relational DBMS. It was developed by the SQL Access Group
SQL Access Group
The SQL Access Group was a group of software companies that was formed in 1989 to define and promote standards for database portability and interoperability...

 in 1992 to standardize the use of a DBMS by an application. ODBC provides a universal middleware
Middleware
Middleware is computer software that connects software components or people and their applications. The software consists of a set of services that allows multiple processes running on one or more machines to interact...

 layer between the application and DBMS, allowing the application developer to use a single interface. If changes are made to the DBMS specification, only the driver needs updating. An ODBC driver can be thought of as analogous to a printer or other driver, providing 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 exist for all major DBMSs and even for text or CSV files.

History

Microsoft, in partnership with Simba Technologies
Simba Technologies
Simba Technologies is a supplier of standards-based data access solutions located in Vancouver, British Columbia, Canada. Simba Technologies specializes in connectivity for ODBC, JDBC, OLE DB for OLAP and XML for Analysis...

, created ODBC by adapting the SQL Access Group CLI. The standard was based on Call Level Interface
Call Level Interface
The Call Level Interface is a software standard defined in ISO/IEC 9075-3:2003. The Call Level Interface defines how a program should send SQL queries to the database management system and how the returned recordsets should be handled by the application in a consistent way...

 (CLI) specifications from the SQL Access Group
SQL Access Group
The SQL Access Group was a group of software companies that was formed in 1989 to define and promote standards for database portability and interoperability...

, X/Open
X/Open
X/Open Company, Ltd. was a consortium founded by several European UNIX systems manufacturers in 1984 to identify and promote open standards in the field of information technology. More specifically, the original aim was to define a single specification for operating systems derived from UNIX, to...

 (after 1996 part of The Open Group
The Open Group
The Open Group is a vendor and technology-neutral industry consortium, currently with over three hundred member organizations. It was formed in 1996 when X/Open merged with the Open Software Foundation...

), and the ISO
International Organization for Standardization
The International Organization for Standardization , widely known as ISO, is an international standard-setting body composed of representatives from various national standards organizations. Founded on February 23, 1947, the organization promulgates worldwide proprietary, industrial and commercial...

/IEC
International Electrotechnical Commission
The International Electrotechnical Commission is a non-profit, non-governmental international standards organization that prepares and publishes International Standards for all electrical, electronic and related technologies – collectively known as "electrotechnology"...

. ODBC 1.0 was released in September 1992. After ODBC 2.0, Microsoft decided to align ODBC 3.0 with the CLI specification making its way through X/Open and ISO. In 1995, SQL/CLI became part of the international SQL standard.

Version history:
  • 1.0: released in September 1992
  • 2.0: ca 1994
  • 2.5
  • 3.0: ca 1995
  • 3.5: ca 1997
  • 3.8: ca 2009, with Windows 7

Drivers

An ODBC driver enables an ODBC-compliant application to use a data source, normally a DBMS. (Some non-DBMS drivers exist, for such data sources as CSV
Comma-separated values
A comma-separated values file stores tabular data in plain-text form. As a result, such a file is easily human-readable ....

 files. Such drivers implement a small DBMS.) ODBC drivers exist for most DBMSs, including Oracle
Oracle database
The Oracle Database is an object-relational database management system produced and marketed by Oracle Corporation....

, Microsoft SQL Server
Microsoft SQL Server
Microsoft SQL Server is a relational database server, developed by Microsoft: It is a software product whose primary function is to store and retrieve data as requested by other software applications, be it those on the same computer or those running on another computer across a network...

, Sybase ASE
Adaptive Server Enterprise
Adaptive Server Enterprise is Sybase Corporation's flagship enterprise-class relational model database server product. ASE is predominantly used on the Unix platform but is also available for Windows.-History:...

, and DB2
IBM DB2
The IBM DB2 Enterprise Server Edition is a relational model database server developed by IBM. It primarily runs on Unix , Linux, IBM i , z/OS and Windows servers. DB2 also powers the different IBM InfoSphere Warehouse editions...

.

Because different technologies have different capabilities, most ODBC drivers do not implement all functionality defined in the ODBC standard. Some drivers offer extra functionality not defined by the standard.

ODBC Driver Manager

The Driver Manager (DM) is the software that loads a particular driver based on the connection information. An application is actually linked to the DM. When the application calls the ODBC function to connect to the DBMS, the DM parses the connection string and loads the appropriate driver.

Windows and Mac OS X include a driver manager. Other operating systems can avail themselves of either of two free implementations, iODBC
IODBC
iODBC is an open source initiative managed by OpenLink Software. It is a platform-independent ODBC SDK and runtime offering that enables the development of ODBC-compliant applications and drivers outside the Windows platform...

 or unixODBC
UnixODBC
unixODBC is an open source project that implements the ODBC API. The code is provided under the GNU GPL/LGPL license and can be built and used on many different operating systems, including most versions of Unix, Linux, Mac OS X, IBM OS/2 and Microsoft's Interix.The goals of the project...

.

Bridging configurations

A bridge is special kind of driver: a driver that uses another driver-based technology.

JDBC-ODBC bridges

A JDBC-ODBC bridge consists of a JDBC driver
JDBC driver
A JDBC driver is a software component enabling a Java application to interact with a database. JDBC drivers are analogous to ODBC drivers, ADO.NET data providers, and OLE DB providers....

 which employs an ODBC driver to connect to a target database. This driver translates JDBC method
Method (computer science)
In object-oriented programming, a method is a subroutine associated with a class. Methods define the behavior to be exhibited by instances of the associated class at program run time...

 calls into ODBC function calls. Programmers usually use such a bridge when a particular database lacks a JDBC driver. Sun Microsystems
Sun Microsystems
Sun Microsystems, Inc. was a company that sold :computers, computer components, :computer software, and :information technology services. Sun was founded on February 24, 1982...

 included one such bridge in the JVM, but viewed it as a stop-gap measure while few JDBC drivers existed. Sun never intended its bridge for production environments, and generally recommends against its use. independent data-access vendors deliver JDBC-ODBC bridges which support current standards for both mechanisms, and which far outperform the JVM built-in.

ODBC-JDBC bridges

An ODBC-JDBC bridge consists of an ODBC driver which uses the services of a JDBC driver to connect to a database. This driver translates ODBC function-calls into JDBC method-calls. Programmers usually use such a bridge when they lack an ODBC driver for a particular database but have access to a JDBC driver.

OLE DB

Microsoft provides an OLE DB
OLE DB
OLE DB is an API designed by Microsoft for accessing data from a variety of sources in an uniform manner. It is a set of interfaces implemented using the Component Object Model ; it is otherwise unrelated to OLE...

-ODBC bridge for simplifying development in COM aware languages (i.e. Visual Basic
Visual Basic
Visual Basic is the third-generation event-driven programming language and integrated development environment from Microsoft for its COM programming model...

). This bridge forms part of the MDAC system component bundle, together with other database drivers.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK