Explain the Types Of JDBC Drivers In Detail.

Hello Friends, In this blog post(Types Of JDBC Drivers In Detail) we are going to let you know about the types of JDBC drivers in detail inside Java.

JDBC drivers are nothing but a software component that enables the Java application to interact with the database.|Types Of Jdbc Drivers In Detail|

There are four types of JDBC drivers and each driver will have its advantages and disadvantages, as well. Let us have a look at these drivers one by one.|Types Of Jdbc Drivers In Detail|

Type 1: JDBC-ODBC Bridge Driver

This driver receives any JDBC calls and sends them to the ODBC(open database connectivity) driver.

ODBC driver understands these calls and communicates with the database library provided by the vendor.

So, the ODBC driver, and the vendor database library must be present on the client machine. See the below fig.

type1 driver-types of jdbc drivers
Type1 driver-types of JDBC drivers


the JDBC-ODBC bridge allows access to almost any database since the database’s ODBC drivers are already available on the client machine.


The performance of this driver is less since the JDBC call goes through the bridge to the ODBC driver, then the native database connectivity library.

The result comes back through the reverse process.

Another requirement is that the ODBC driver and the native database connectivity library must already be installed on the client machine.

Type 2: Native API-Partly Java driver-

It converts JDBC calls into database-specific calls with the help of the vendor database library.

The type 2 driver communicates directly with the database server, therefore it requires that some binary code be present on the client machine. See the below fig.

type2 driver- types of jdbc drivers
Type 2 driver- types of JDBC drivers


Type 2 drivers typically offer better performance than the JDBC-ODBC bridge.


The vendor database library needs to be loaded on each client machine. This is the reason type 2 drivers can not be used for the internet.

Type 2 drivers show lower performance than type 3 and type 4 drivers.

Type 3: Net protocol-pure Java driver

It follows a three-tiered approach whereby the JDBC database requests are passed through the network to a middle-tier server(Ex- Net Server).

The middle-tier server translates the request to the database-specific library and then sends it to the database server.

The database server then executes the request and gives back the results. See below Fig.

type3 driver- types of jdbc drivers
Type 3 driver- types of JDBC drivers


This driver is server-based. so there is no need for any vendor database library to the present on the client machine.


Type 3 drivers Require database-specific coding to be done in the middle tier(in the net server). Maintenance of the middle-tier server becomes costly.

Type 4: Native protocol-Pure Java driver:

This driver converts the JDBC calls into the vendor-specific database management system(DBMS) protocol so that the client application can communicate directly with the database server.

Level 4 drivers are completely implemented in Java to achieve platform independence and eliminate deployment administration issues. See the below fig.

type4 driver- types of jdbc drivers
Type 4 driver- types of JDBC drivers


This driver has better performance than Type 1 and Type 2.

Also, there is no need to install any special software on the client or server.


With type 4 drivers, the user needs a different driver for each database.

For example, to communicate with the Oracle server, we need an Oracle driver and to communicate with the Sybase server, we need a Sybase driver.

You can also go through a few more blog links below related to core Java:

Stack vs Heap Memory Allocation In Hindi…
Inner Class In Java In Hindi…
Instance Variable vs Class Variable In Hindi…
Difference Between Instance Variable And Static Variable In Java…
Inner Class With Suitable Example In Java…
Difference Between PHP and JAVA In Hindi…
Why Java Is A Secure Language In Hindi…
Relational operator in Hindi in Java…
Logical operator in Hindi in Java…
Assignment Operator in Hindi in Java…
Unary operator in Java example in Hindi…
Arithmetic operators in Java in Hindi…
Operators In Java In Hindi…
Types Of Inheritance In Hindi…
Garbage Collection In Java In Hindi…
Interface In Java In Hindi|java में Interface क्या होता है…
Access Specifier In Java In Hindi…
Explain Types Of Jdbc Drivers In Detail…
Super Keyword In Java In Hindi…
Static Keyword in Java in Hindi…


So friends, within this blog post(Types Of JDBC Drivers In Detail) we have gone through the types of JDBC drivers. JDBC helps to communicate with any database through a Java program which is an essential feature for any project development environment since each software requires data representing different transactions to be stored and retrieved later on demand.

JDBC eliminates the need to master the commands to communicate with different databases by providing a common mechanism to communicate with any database in the world. Each time the database is changed, the Java program needs not to be changed and hence this provides better maintenance of code across different platforms.|Types Of Jdbc Drivers In Detail|

In the case of any queries, you can write to us at support@a5theory.com we will get back to you ASAP.

Hope! you would have enjoyed this post about the Types Of Jdbc Drivers In Detail.

Please feel free to give your important feedback in the comment section below.

Have a great time!


I am a blogger by passion, a software engineer by profession, a singer by consideration and rest of things that I do is for my destination.