The International standard for SQL defines a standard high-level language for accessing and manipulating the data which is stored in a relational database. The International standard for the SQL CLI defines an application programming interface (API) that programs use to issue SQL statements in a standardized manner through a series of well-defined API functions.
The term Open Database Connectivity (ODBC) is a more commonly used term than SQL CLI, and in many contexts, the two terms are used synonymously. ODBC is a Microsoft specification for an API that constitutes an implementation of the International standards for the SQL CLI. ODBC is a superset of the SQL API, since it defines many functions that the International standards for the SQL API do not define. However, the SQL CLI and the Microsoft ODBC specification are closely aligned, and the two terms are used interchangeably especially in the C and C++ programming environments. Unless otherwise noted, the terms SQL CLI and ODBC mean the same thing in this document.
Sun Microsystems developed a specification, called JDBC, that defines an API for the Java™ programming environment that Java programmers use to access relational databases and issue SQL statements. The JDBC specification defines many of the same types of functions for Java programmers that ODBC and the SQL CLI define for C and C++ programmers. It is possible for Java programs to directly invoke the API functions defined by ODBC and the SQL API. However, the nature of the Java programming environment makes this process cumbersome. JDBC often provides a better solution than ODBC for the object-oriented Java programming environment.
Like ODBC, JDBC is an implementation of the International standards for the SQL CLI. The JDBC implementation consists of a set of Java interfaces, classes, and methods that a Java programmer can use to do the same types of functions that a C or C++ programmer uses when invoking ODBC function calls. Similarly, JDBC constitutes a superset of the SQL CLI, since it defines many functions that the International standards for the SQL CLI do not define.
OLE DB was designed as a higher-level replacement for ODBC to support a wider variety of non-relational databases that do not necessarily implement SQL (for example, object databases and spreadsheets). OLE has a client-provider model, where clients request access to data, and providers are the software component interfaces that allow access to the data.