JDBC
JDBC
JDBC
Bridging configurations[edit]
A bridge is a special kind of driver: a driver that uses another driver-based technology.
ODBC-to-JDBC (ODBC-JDBC) bridges[edit]
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 some database but
have access to a JDBC driver. Example: SequeLink ODBC-JDBC Bridge
JDBC-to-ODBC (JDBC-ODBC) bridges[edit]
A JDBC-ODBC bridge consists of a JDBC driver which employs an ODBC driver to connect to
a target database. This driver translates JDBC method calls into ODBC function calls.
Programmers usually use such a bridge when a given database lacks a JDBC driver. Sun
Microsystems 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 recommended against its use. As of 2008 independent data-access vendors deliver
JDBC-ODBC bridges which support current standards for both mechanisms, and which far
outperform the JVM built-in.[citation needed] Example: SequeLink JDBC-ODBC Bridge
The JDBC-ODBC bridge was dropped in Java 8.
OLE DB-to-ODBC bridges[edit]
An OLE DB-ODBC bridge consists of an OLE DB Provider which uses the services of an
ODBC driver to connect to a target database. This provider translates OLE DB method calls into
ODBC function calls. Programmers usually use such a bridge when a given database lacks an
OLE DB provider. Microsoft ships one, MSDASQL.DLL, as part of the MDAC system
component bundle, together with other database drivers, to simplify development in COM-aware
languages (e.g. Visual Basic). Third parties have also developed such, notably OpenLink
Software whose 64-bit OLE DB Provider for ODBC Data Sources filled the gap when Microsoft
initially deprecated this bridge for their 64-bit OS. [28] (Microsoft later relented, and 64-bit
Windows starting with Windows Server 2008 and Windows Vista SP1 have shipped with a 64-
bit version of MSDASQL.) Example: SequeLink OLEDB-ODBC Bridge
ADO.NET-to-ODBC bridges[edit]
An ADO.NET-ODBC bridge consists of an ADO.NET Provider which uses the services of an
ODBC driver to connect to a target database. This provider translates ADO.NET method calls
into ODBC function calls. Programmers usually use such a bridge when a given database lacks
an ADO.NET provider. Microsoft ships one as part of the MDAC system component bundle,
together with other database drivers, to simplify development in C#. Third parties have also
developed such. Example: SequeLink ADO.NET-ODBC Bridge
Open Database Connectivity (ODBC) is Microsoft's strategic interface for accessing data in a
heterogeneous environment of relational and non- relational database management systems.
Based on the Call Level Interface specification of the SQL Access Group, ODBC provides an
open, vendor- neutral way of accessing data stored in a variety of proprietary personal computer,
minicomputer, and mainframe databases.
ODBC alleviates the need for independent software vendors and corporate developers to learn
multiple application programming interfaces. ODBC now provides a universal data access
interface. With ODBC, application developers can allow an application to concurrently access,
view, and modify data from multiple, diverse databases.
ODBC is a core component of Microsoft Windows Open Services Architecture. Apple has
endorsed ODBC as a key enabling technology by announcing support into System 7 in the
future. With growing industry support, ODBC is quickly emerging as an important industry
standard for data access for both Windows and Macintosh applications.
ODBC is a specification to which developers write either:
-or-
An ODBC Driver for a "back-end" or "server" DBMS (Database Management System).
This is the DBMS application that resides on a computer that is used to store data for access by
several users. This application is not what is loaded on the end user's computer. This server
application is usually more robust (faster, with centralized security, and backups of data, and so
forth) than the client application. The ODBC Driver resides between the ODBC Client and the
DBMS; however, it is loaded on the front-end computer.
To use ODBC, the following three components are required:
ODBC CLIENT - an ODBC-enabled front-end (also called ODBC client) - Examples: Microsoft
Access, an application created with Access, an application created with Microsoft Visual Basic,
an application created with C+Win SDK+ODBC SDK, or ODBC-enabled applications from
other vendors (such as Lotus).
ODBC DRIVER - an ODBC Driver for the ODBC Server. The ODBC Driver Catalog contains
an extensive listing of ODBC Drivers. For example, the Microsoft ODBC Driver Pack is a
collection of seven ODBC Drivers ready to be used or bundled with ODBC clients. A SQL
Server ODBC Driver is included with Access, and Informix is working on an ODBC driver for
Informix. To obtain an ODBC Driver Catalog, call the Microsoft Order Desk at (800) 360-7561.
If you are outside the United States, contact your local subsidiary. To locate your subsidiary, see
the Microsoft World Wide Offices Web site at:
http://www.microsoft.com/worldwide/
Any ODBC client can access any DBMS for which there is an ODBC Driver. DBMS SERVER
is a back-end or server DBMS, for example SQL Server, Oracle, AS/400, Foxpro, Microsoft
Access, or any DBMS for which an ODBC driver exists.
Access front-end accessing data from a Oracle back-end using the Oracle ODBC Driver,
which ships with Access 1.1.
Visual Basic front-end accessing data from a dBASE back-end using the dBASE ODBC
Driver, which is part of the MS ODBC Database Drivers Pack.
C application written using C+ODBC SDK+Win SDK accessing data from an AS/400
using the AS/400 ODBC Driver available from Rochester Software.
The ODBC SDK is distributed on floppy disks, and contains about 150 pages of text that allows
a developer to write an ODBC-enabled Client or an ODBC Driver. The ODBC SDK is to be
used in conjunction with the Windows Software Developers Kit (SDK) and a C Compiler.
2. What is the ODBC Database Driver Pack?
The ODBC Database Driver Pack is a collection of ODBC Drivers that is sold by Microsoft.
3. What is the ODBC Driver Catalog?
The ODBC Driver Catalog contains descriptions of ODBC drivers developed by Microsoft and
other software companies. It contains an explanation of ODBC, and demonstrates industry
support for the standard.
4. What ODBC drivers are currently available?
Dozens of ODBC drivers are currently available, including those for Microsoft SQL Server,
XLS, Text, xBase, Paradox, ODS, Oracle, RedISAM, FoxBase, Btrieve, Integra-SQL, DEC Rdb,
SQLBase, Informix, Ingres, DB2, SQL/DS, Teradata, and SQL/400.
5. How do I write an ODBC driver?
From Microsoft: Access, Visual Basic, Foxpro+Connectivity Kit, Word 6.0 for Windows, Excel
5.0, MS Query Tool.
From other vendors: PowerSoft, ObjectView, Lotus 1-2-3, Lotus Approach, Lotus Notes, Q+E,
and others.
7. How does one write an ODBC client?
By using C+Win SDK+ODBC SDK, or by using Access, or by using Visual Basic, or by using
WinFox +Connectivity Kit, or by using one of the tools from other vendors designed to do this.
Difference Between JDBC ODBC
ODBC is an open interface which can be used by any application to communicate with any
database system, while JDBC is an interface that can be used by Java applications to access
databases. Therefore, unlike JDBC, ODBC is language independent. But by using JDBC-to-
ODBC bridge Java applications can also talk to any ODBC compliant database.
ODBC vs JDBC
Typically, software applications are written in a specific programming language (such as Java,
C#, etc.), while databases accept queries in some other database specific language (such as SQL).
Therefore, when a software application needs to access data in a database, an interface that can
translate languages to each other (application and database) is required. Otherwise, application
programmers need to learn and incorporate database specific languages within their applications.
ODBC (Open Database Connectivity) and JDBC (Java DatabBase Connectivity) are two
interfaces that solve this specific problem. ODBC is a platform, language and operating system
independent interface that can be used for this purpose. Similarly, JDBC is a data API for the
Java programming language. Java programmers can use JDBC-to-ODBC bridge to talk to any
ODBC compliant database.
What is ODBC?
ODBC is an interface to access database management systems (DBMS). ODBC was developed
by SQL Access Group in 1992 at a time there were no standard medium to communicate
between a database and an application. It does not depend on a specific programming language
or a database system or an operating system. Programmers can use ODBC interface to write
applications that can query data from any database, regardless of the environment it is running on
or the type of DBMS it uses.
Because ODBC driver acts as a translator between the application and the database, ODBC is
able to achieve the language and platform independence. This means that the application is
relieved of the burden of knowing the database specific language. Instead it will only know and
use the ODBS syntax and the driver will translate the query to the database in a language it can
understand. Then, the results are returned in a format that can be understood by the application.
ODBC software API can be used with both relational and non relational database systems.
Another major advantage of having ODBC as a universal middleware between an application
and a database is that every time the database specification changes, the software does not need
to be updated. Only an update to the ODBC driver would be sufficient.
What is JDBC?
JDBC is a Data API developed for Java programming language. It was released with JDK 1.1 by
Sun Microsystems (Java’s initial owners). And its current version is JDBC 4.0 (currently
distributed with JAVA SE6). Java.sql and javax.sql packages contain the JDBC classes. It is an
interface that helps a client to access a database system, by providing methods to query and
update data in the databases. JDBC is more suitable for object oriented databases. You can
access any ODBC-compliant database by using the JDBC-to-ODBC bridge.
1.ODBC is for Microsoft and JDBC is for java applications.
2.ODBC can't be directly used with Java because it uses a C
interface.
3.ODBC makes use of pointers which have been removed
totally from java.
4.ODBC mixes simple and advanced features together and has
complex options for simple queries,But JDBC is designed to
keep things simple while allowing advanced capabilities
when required.
5.ODBC requires manual installation of the ODBC driver
manager and driver on all client machines.JDBC drivers are
written in java and JDBC code is automatically
installable,secure,and portable on all platforms.
6. JDBC API is a natural Java Interface and is built on
ODBC. JDBC retains some of the basic feature of ODBC
The implementations found on ODBCs are run through a plethora of operating systems. These
systems include, but are not limited to Microsoft Windows, Unix, Linux, and Mac OS X. There
are literally hundreds of drivers that exist of the ODBC variety –these include drivers for
enterprise DBMS (Oracle, DB2, Microsoft SQL Server, Sybase, IBM Lotus Domino, and
OpenLink Virtuoso). Some of these drivers are also found on desktop database products such as
FileMaker and Microsoft Access.
JDBC makes it possible for multiple implementations to exist and be used by the exact same
application for every implementation. This API offers a mechanism for dynamically loading the
necessary Java packages and registering those particular packages to the JDBC Driver Manager.
The Driver Manager is specifically used as a means to produce many connections –essentially,
acting as a connection factory– in order to create connections of the JDBC variety. These
connections support the creation and execution of statements. These statements have the ability
to be updated (statements such as the SQL statements CREATE, INSERT, UPDATE, and
DELETE). These statements may also be query statements (like the SELECT statement). Stored
procedures are able to be invoked through a JDBC connection. There are three specific classes in
which these statements may be represented in JDBC: Statement, PreparedStatement, and
CallableStatement. Statements that are considered update statements return an update count. This
count indicates how many rows were affected in the database. Query statements return a JDBC
row result set –meaning it is a statement that is invoked in order to walk over the result set.
Summary:
1. ODBC is a function that provides a standard software API method to computers using
DBMSs; JDBC is an API used for the Java programming language to define how a client may
access a database.
2. ODBC implementations are run through multiple operating systems; JDBC implementations
can exist and be used by the same application.
JDBC and ODBC are based on the X/Open SQL call-level interface standard. They provide an
Application Program Interface, or API, that allows the same program to access different
databases regardless of vendor ownership. Using standard Structured Query Language, or SQL,
statements, databases can be queried to either store, retrieve, delete or modify data.
JDBC is commonly used for object-oriented databases while ODBC is used to access Database
Management Systems, or DBMS. JDBC can only be used by applications written in Java,
whereas ODBC does not depend on the programming language, operating system and platform
of the program trying to access a database. This independence is achieved by the ODBC by
acting as translator between the database and application through a driver manager. JDBC can
only connect to ODBC-compliant databases by using a JDBC-to-ODBC bridge.
Some JDBC proponents suggest that JDBC is easier to learn compared to ODBC. Another
advantage of JDBC over ODBC is faster implementation on non-Windows applications.
1.ODBC is for Microsoft and JDBC is for java applications.
2.ODBC can't be directly used with Java because it uses a C interface.
3.ODBC makes use of pointers which have been removed totally from java.
4.ODBC mixes simple and advanced features together and has complex options for
simple queries, But JDBC is designed to keep things simple while allowing
advanced capabilities when required.
5.ODBC requires manual installation of the ODBC driver manager and driver on all
client machines. JDBC drivers are written in java and JDBC code is automatically
installable, secure, and portable on all platforms.
6. JDBC API is a natural Java Interface and is built on ODBC. JDBC retains some
of the basic feature of ODBC