Newsletter sign-up
View all newsletters

Sign up for our technology specific newsletters.

Enterprise Java
Email Address:

JDBC drivers in the wild

Learn how to deploy, use, and benchmark JDBC driver types 1, 2, 3, and 4

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone

Why should you consider Java Database Connectivity (JDBC) drivers apart from the JDBC-ODBC Bridge? What level of JDBC driver is suited for your application? What parameters should you use for evaluating a JDBC driver? This article evaluates various JDBC drivers and answers these questions.

While writing JDBC applications, developers generally start with JDBC-ODBCBridge to connect to databases. But when an application reaches some advanced stage, for example, when it needs to support multithreading, the JDBC-ODBCBridge poses a few problems. So, the need arises for a robust JDBC driver. In that case, the type of driver depends on quite a few parameters: whether the application is Internet or intranet based, whether it needs to support heterogeneous databases, the number of concurrent users, and so on.

In the first section of this article, we'll look at the basic architecture underlying the four JDBC driver types and enumerate the pros and cons for choosing one type over another -- information you can use to decide what type of JDBC drivers will be best suited for your specific application.

More about JDBC drivers

In the second section, we'll see evaluations of five specific industry-standard drivers: Sun's JDBC-ODBC Bridge, IDS Software's IDS Driver, Ashna's JTurbo, I-net Software's I-net Sprinta, and MERANT's SequeLink. I have also provided the steps required to evaluate each driver, as well as code snippets for specifying the classpath, loading the driver, establishing a database connection, and retrieving and inserting records. You may find it useful to use the code snippets provided in your evaluation program and follow these steps to determine benchmarks suited to your software and hardware requirements.

JDBC driver types

JDBC drivers are divided into four types or levels. Each type defines a JDBC driver implementation with increasingly higher levels of platform independence, performance, and deployment administration. The four types are:

  • Type 1: JDBC-ODBC Bridge
  • Type 2: Native-API/partly Java driver
  • Type 3: Net-protocol/all-Java driver
  • Type 4: Native-protocol/all-Java driver


Type 1: JDBC-ODBC Bridge

The type 1 driver, JDBC-ODBC Bridge, translates all JDBC calls into ODBC (Open DataBase Connectivity) calls and sends them to the ODBC driver. As such, the ODBC driver, as well as, in many cases, the client database code, must be present on the client machine. Figure 1 shows a typical JDBC-ODBC Bridge environment.

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comments (5)
Login
Forgot your account info?

Article on jdbc driversBy Anonymous on November 10, 2009, 4:04 amThe article of 4 jdbc driver was not enough. Diagram were good.

Reply | Read entire comment

4 Types Of Drivers In JDBCBy Anonymous on August 14, 2009, 2:29 amThanks A Lot. Now am clear about your derivation. I can manage database connections according to my need. Once again Thanks a a lot. Can anyone give me an example...

Reply | Read entire comment

Article on JDBC driver typesBy Anonymous on August 10, 2009, 8:51 amAn excellent document explaining JDBC driver types and thier appication in different environments. KUDOS to Nitin and JAVAWorld...

Reply | Read entire comment

Article on JDBC DriversBy Anonymous on July 23, 2009, 6:18 amIt's a very Good article Nitin. Thanks a Lot.

Reply | Read entire comment

Article on jdbc driversBy Anonymous on May 2, 2009, 2:37 amThe article on four types of JDBC drivers was really good and I enjoyed reading it. Diagrams were very informative and illuminating

Reply | Read entire comment

View all comments

Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.
Resources