SlideShare a Scribd company logo
By: Rahul Sharma
JDBC stands for Java Database Connectivity. It
is a software component, which enable us to
interact with database. It works as an interface
between the client and a database server. It
contains various classes and their methods.
JDBC drivers enable us to create database
connections and to interact with it by sending
SQL or database commands.
1. Type 1: JDBC-ODBC bridge driver
2. Type 2: Native-API driver/Partly driver
3. Type 3: Network-Protocol driver (Middleware driver)
4. Type 4: Database-Protocol driver (Pure Java driver) or thin
driver.
This driver converts JDBC method
calls into ODBC function calls. This
driver is platform-dependent as it
makes use of ODBC which depends
on native libraries of the
underlying OS. Also, use of this
driver leads to other installation
dependencies.
For example, ODBC must
be installed on the computer having
the driver and the database must
support an ODBC driver.
1. Almost any database for which an ODBC driver is installed can
be accessed, and data can be retrieved.
1. Performance overhead since the calls have to go through the
JDBC bridge to the ODBC driver, then to the native db
connectivity interface (thus may be slower than other types of
drivers).
2. The ODBC driver needs to be installed on the client machine.
3. Not suitable for applets, because the ODBC driver needs to be
installed on the client.
4. This driver internally depending on ODBC driver and ODBC
driver is available only for windows platforms and hence
portability of this driver is much less (platform dependent driver).
5. No support from JDK 1.8v onwards
In Type 2 driver, JDBC API calls
are converted into native C/C++
API calls, which are unique to the
database. These drivers are
provided by the database vendors
and used in the same manner as
the JDBC-ODBC Bridge. The
vendor-specific driver must be
installed on each client machine.
If we change the
Database, we have to change the
native API, as it is specific to a
database, but you may realize
increase in speed with a Type 2
driver, because it eliminates
ODBC's overhead.
1. As there is no implementation of JDBC-ODBC bridge, its
considerably faster than a type 1 driver.
1. The vendor client library needs to be installed on the client
machine.
2. Not all databases have a client side library.
3. This driver is platform dependent.
4. This driver supports all java applications except applets.
The type 3 driver, also known as the
Pure Java driver for database-
middleware, is a database driver
implementation which makes use of
a middle tier between the calling
program and the database. The
middle-tier converts JDBC calls
directly or indirectly into the vendor-
specific database protocol.
The same driver can be used
for multiple databases. The type 3
driver is platform-independent as the
platform-related differences are
taken care of by the middleware.
Also, making use of the middleware
provides additional advantages of
security and firewall access.
1. Requires database-specific coding to be done in the middle tier.
2. The middleware layer added may result in additional latency, but
is typically overcome by using better middleware services
1. Since the communication between client and the middleware
server is database independent, there is no need for the
database vendor library on the client.
2. The middleware server (which can be a full-fledged J2EE
Application server) can provide typical middleware services like
caching, load balancing, logging, and auditing.
3. A single driver can handle any database, provided the
middleware supports it.
The type 4 driver, also known as the
Direct to Database Pure Java
Driver, that converts JDBC calls
directly into a vendor-
specific database protocol.
This provides better
performance than the type 1 and
type 2 drivers as it does not have the
overhead of conversion of calls into
ODBC or database API calls. Unlike
the type 3 drivers, it does not need
associated software to work. As the
database protocol is vendor specific,
the JDBC client requires separate
drivers, usually vendor supplied, to
connect to different types of
1. Completely implemented in Java to achieve platform
independence.
2. The client application connects directly to the database server.
No translation or middleware layers are used, improving
performance.
3. The JVM can manage all aspects of the application-to-database
connection; this can facilitate debugging.
1. Drivers are database dependent, as different database vendors
use widely different (and usually proprietary) network protocols.
1. If you are accessing one type of database, such as Oracle,
Sybase, or IBM, the preferred driver type is 4.
2. If your Java application is accessing multiple types of databases
at the same time, type 3 is the preferred driver.
3. Type 2 drivers are useful in situations, where a type 3 or type 4
driver is not available yet for your database.
4. The type 1 driver is not considered a deployment-level driver,
and is typically used for development and testing purposes only.
Referenced by: Wikipedia.

More Related Content

PPTX
Types of Drivers in JDBC
PPS
Jdbc architecture and driver types ppt
PPT
JDBC Architecture and Drivers
DOCX
Introduction to java
PPT
JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...
PPTX
Introduction to java
PPT
Jsp ppt
PPSX
JDBC: java DataBase connectivity
Types of Drivers in JDBC
Jdbc architecture and driver types ppt
JDBC Architecture and Drivers
Introduction to java
JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...
Introduction to java
Jsp ppt
JDBC: java DataBase connectivity

What's hot (20)

PPTX
Summer training presentation on "CORE JAVA".
PPTX
JDBC ppt
PPTX
Training on Core java | PPT Presentation | Shravan Sanidhya
PPTX
Java seminar
PPTX
Black box software testing
PPTX
Java database connectivity with MySql
PPT
Requirement specification (SRS)
PPT
Capturing Measurable Non Functional Requirements
PPTX
Core java complete ppt(note)
PPTX
QSpiders - Jdk Jvm Jre and Jit
PDF
Enterprise java unit-1_chapter-1
PPTX
Validation testing
PPTX
Java programming course for beginners
PDF
Unit and integration Testing
PPT
Jdbc ppt
PPT
Software Requirements in Software Engineering SE5
PPTX
All You Need to Know About Java – Advantages and Disadvantages
PPTX
Core java
PPTX
Enterprise java unit-1_chapter-3
Summer training presentation on "CORE JAVA".
JDBC ppt
Training on Core java | PPT Presentation | Shravan Sanidhya
Java seminar
Black box software testing
Java database connectivity with MySql
Requirement specification (SRS)
Capturing Measurable Non Functional Requirements
Core java complete ppt(note)
QSpiders - Jdk Jvm Jre and Jit
Enterprise java unit-1_chapter-1
Validation testing
Java programming course for beginners
Unit and integration Testing
Jdbc ppt
Software Requirements in Software Engineering SE5
All You Need to Know About Java – Advantages and Disadvantages
Core java
Enterprise java unit-1_chapter-3
Ad

Viewers also liked (20)

PPT
PPT
Jdbc in java
PPT
Different type of_software_testing - copy
PPTX
Chapter v(error)
PDF
PDF
Exceptions in PHP
PPT
Evolution of java
PPTX
Software Process Models
PPTX
PPTX
SDLC and Software Process Models
PPTX
Java Programming- Introduction to Java Applet Programs
PPT
Types of Software testing
PDF
Lecture03 p1
PPTX
Unit testing
PPT
Java applets
PDF
Programacion con java
PPT
Introduction to the Servlet / JSP course
PPT
Software quality assurance
Jdbc in java
Different type of_software_testing - copy
Chapter v(error)
Exceptions in PHP
Evolution of java
Software Process Models
SDLC and Software Process Models
Java Programming- Introduction to Java Applet Programs
Types of Software testing
Lecture03 p1
Unit testing
Java applets
Programacion con java
Introduction to the Servlet / JSP course
Software quality assurance
Ad

Similar to JDBC Driver Types (20)

DOCX
Jdbc driver types
PPTX
Jdbc driver types
DOC
Jdbc drivers
PPTX
jdbc.pptx jdbc.pptxjdbc.pptxjdbc.pptxjdb
PPTX
Chapter2 j2ee
PDF
PPT
JDBC java database connectivity with dbms
PPTX
Jdbc
PDF
unit8_jdbc.pdf mysql and java jdbc connection
DOC
jdbc document
PPT
Unit 5-jdbc2
PPTX
Advanced JAVA
PDF
Java and Database - Interacting with database
PPTX
Jdbc drivers
PDF
Java unit 14
PPTX
PPTX
java.pptx
PPT
Jdbc complete
Jdbc driver types
Jdbc driver types
Jdbc drivers
jdbc.pptx jdbc.pptxjdbc.pptxjdbc.pptxjdb
Chapter2 j2ee
JDBC java database connectivity with dbms
Jdbc
unit8_jdbc.pdf mysql and java jdbc connection
jdbc document
Unit 5-jdbc2
Advanced JAVA
Java and Database - Interacting with database
Jdbc drivers
Java unit 14
java.pptx
Jdbc complete

Recently uploaded (20)

PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
RMMM.pdf make it easy to upload and study
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
Pharma ospi slides which help in ospi learning
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Institutional Correction lecture only . . .
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Insiders guide to clinical Medicine.pdf
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PPTX
master seminar digital applications in india
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
RMMM.pdf make it easy to upload and study
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
STATICS OF THE RIGID BODIES Hibbelers.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
FourierSeries-QuestionsWithAnswers(Part-A).pdf
VCE English Exam - Section C Student Revision Booklet
Pharma ospi slides which help in ospi learning
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
O5-L3 Freight Transport Ops (International) V1.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Complications of Minimal Access Surgery at WLH
Renaissance Architecture: A Journey from Faith to Humanism
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Institutional Correction lecture only . . .
Microbial disease of the cardiovascular and lymphatic systems
Insiders guide to clinical Medicine.pdf
Week 4 Term 3 Study Techniques revisited.pptx
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
master seminar digital applications in india

JDBC Driver Types

  • 2. JDBC stands for Java Database Connectivity. It is a software component, which enable us to interact with database. It works as an interface between the client and a database server. It contains various classes and their methods. JDBC drivers enable us to create database connections and to interact with it by sending SQL or database commands.
  • 3. 1. Type 1: JDBC-ODBC bridge driver 2. Type 2: Native-API driver/Partly driver 3. Type 3: Network-Protocol driver (Middleware driver) 4. Type 4: Database-Protocol driver (Pure Java driver) or thin driver.
  • 4. This driver converts JDBC method calls into ODBC function calls. This driver is platform-dependent as it makes use of ODBC which depends on native libraries of the underlying OS. Also, use of this driver leads to other installation dependencies. For example, ODBC must be installed on the computer having the driver and the database must support an ODBC driver.
  • 5. 1. Almost any database for which an ODBC driver is installed can be accessed, and data can be retrieved. 1. Performance overhead since the calls have to go through the JDBC bridge to the ODBC driver, then to the native db connectivity interface (thus may be slower than other types of drivers). 2. The ODBC driver needs to be installed on the client machine. 3. Not suitable for applets, because the ODBC driver needs to be installed on the client. 4. This driver internally depending on ODBC driver and ODBC driver is available only for windows platforms and hence portability of this driver is much less (platform dependent driver). 5. No support from JDK 1.8v onwards
  • 6. In Type 2 driver, JDBC API calls are converted into native C/C++ API calls, which are unique to the database. These drivers are provided by the database vendors and used in the same manner as the JDBC-ODBC Bridge. The vendor-specific driver must be installed on each client machine. If we change the Database, we have to change the native API, as it is specific to a database, but you may realize increase in speed with a Type 2 driver, because it eliminates ODBC's overhead.
  • 7. 1. As there is no implementation of JDBC-ODBC bridge, its considerably faster than a type 1 driver. 1. The vendor client library needs to be installed on the client machine. 2. Not all databases have a client side library. 3. This driver is platform dependent. 4. This driver supports all java applications except applets.
  • 8. The type 3 driver, also known as the Pure Java driver for database- middleware, is a database driver implementation which makes use of a middle tier between the calling program and the database. The middle-tier converts JDBC calls directly or indirectly into the vendor- specific database protocol. The same driver can be used for multiple databases. The type 3 driver is platform-independent as the platform-related differences are taken care of by the middleware. Also, making use of the middleware provides additional advantages of security and firewall access.
  • 9. 1. Requires database-specific coding to be done in the middle tier. 2. The middleware layer added may result in additional latency, but is typically overcome by using better middleware services 1. Since the communication between client and the middleware server is database independent, there is no need for the database vendor library on the client. 2. The middleware server (which can be a full-fledged J2EE Application server) can provide typical middleware services like caching, load balancing, logging, and auditing. 3. A single driver can handle any database, provided the middleware supports it.
  • 10. The type 4 driver, also known as the Direct to Database Pure Java Driver, that converts JDBC calls directly into a vendor- specific database protocol. This provides better performance than the type 1 and type 2 drivers as it does not have the overhead of conversion of calls into ODBC or database API calls. Unlike the type 3 drivers, it does not need associated software to work. As the database protocol is vendor specific, the JDBC client requires separate drivers, usually vendor supplied, to connect to different types of
  • 11. 1. Completely implemented in Java to achieve platform independence. 2. The client application connects directly to the database server. No translation or middleware layers are used, improving performance. 3. The JVM can manage all aspects of the application-to-database connection; this can facilitate debugging. 1. Drivers are database dependent, as different database vendors use widely different (and usually proprietary) network protocols.
  • 12. 1. If you are accessing one type of database, such as Oracle, Sybase, or IBM, the preferred driver type is 4. 2. If your Java application is accessing multiple types of databases at the same time, type 3 is the preferred driver. 3. Type 2 drivers are useful in situations, where a type 3 or type 4 driver is not available yet for your database. 4. The type 1 driver is not considered a deployment-level driver, and is typically used for development and testing purposes only.