Share on Google+Share on Google+

Types of JDBC drivers

In this example the types of jdbc drivers are given and its types.
JDBC Driver's Type

JDBC Driver can be broadly categorized into 4 categories--



1.Convert the query of JDBC Driver into the ODBC query, which in return pass the data.

2.JDBC-ODBC is native code not written in java.

3.The connection occurs as follows -- Client -> JDBC Driver -> ODBC Driver -> Database  .

jdbc-odbc bridge driver


A type-1 driver is easy to install and handle


1.Extra channels in between database and application made performance overhead.

2.Needs to be installed on client machine.

3.Not suitable for applet , due to the installation at clients end.

Native-API Type-2 Driver  


The type 2 driver need libraries installed at client site. For example, we need "mysqlconnector.jar" to be copied in library of java kit. It is not written in java entirely because the non-java interface have the direct access to database.


1.Type 2 driver has additional functionality and better performance than Type 1.

2.Has faster performance than type 1,3 &4,since it has separate code for native APIS.


1.library needs to be installed on the client machine .

2.Due to the client side software demand, it can't be used for web based application.

3.platform dependent.

4.It doesn't support "Applets".

Network-Protocol Type 3 driver 


1.It has a 3-tier architecture.

2.It can interact with multiple database of different environment.

3.The JDBC Client driver written in java, communicates with a middleware-net-server using a database independent protocol, and then this net server translates this request into database commands for that database.

4.The connection occurs as follows--Client -> JDBC Driver -> Middleware-Net Server -> Any Database.


1.The client driver to middleware communication is database independent.

2.Can be used in internet since there is no client side software needed.


1.Needs specific coding for different database at middleware.

2.Due to extra layer in middle can result in time-delay.

Native Protocol Type 4 Driver


Also known as Direct to Database Pure Java Driver .It is entirely in java. It interacts directly with database generally through socket connection. It is platform independent. It directly coverts driver calls into database protocol calls.


1.Improved performance because no intermediate translator like JDBC or middleware server.

2.All the connection is managed by JVM, so debugging is easier.


Posted on: May 31, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.