0% found this document useful (0 votes)
74 views18 pages

Prepared By:-Shraddha Ponkiya

This document discusses different types of JDBC drivers. It explains that a JDBC driver enables a Java application to interact with a database. There are four main types of JDBC drivers: Type 1 (JDBC-ODBC bridge), Type 2 (Native API partly Java), Type 3 (Network protocol), and Type 4 (Thin driver). Each type has advantages and disadvantages related to performance, platform dependence, and required libraries. The Type 4 or Thin driver interacts directly with the database without any native libraries or middleware.

Uploaded by

shraddha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views18 pages

Prepared By:-Shraddha Ponkiya

This document discusses different types of JDBC drivers. It explains that a JDBC driver enables a Java application to interact with a database. There are four main types of JDBC drivers: Type 1 (JDBC-ODBC bridge), Type 2 (Native API partly Java), Type 3 (Network protocol), and Type 4 (Thin driver). Each type has advantages and disadvantages related to performance, platform dependence, and required libraries. The Type 4 or Thin driver interacts directly with the database without any native libraries or middleware.

Uploaded by

shraddha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

Prepared By :- Shraddha Ponkiya

A JDBC Driver is a software


component enabling a Java
application to interact with a
database.

 Toconnect with individual databases,


JDBC(Java Database Connectivity
API) requires drivers for each
database.
 The JDBC drivers gives out
the connection to the
database and implements
the protocol for transferring
the query and result
between client and
database.
 JDBC Driver is required to process SQL
requests and generate result. The
following are the different types of driver
available in JDBC.
Type-1 Driver or JDBC-ODBC bridge
Type-2 Driver or Native API Partly Java
Driver
Type-3 Driver or Network Protocol Driver
Type-4 Driver or Thin Driver
 Type-1 Driver act as a bridge
between JDBC and other database
connectivity mechanism(ODBC). This
driver converts JDBC calls into ODBC
calls and redirects the request to the
ODBC driver.
 The Driver is platform-dependent as
it makes use of ODBC which in turn
depends on native libraries of the
underlying operating system the JVM
is running upon.

 Drivers
sun.jdbc.odbc.JdbcOdbc
provide by JavaSoft with JDK
 Advantages ::-
-It is very easy to use.
-almost any database is
supported.

 Disadvantages ::-
-Slow execution time.
-Dependent on ODBC Driver.
-Uses Java Native Interface(JNI)
to make ODBC call.
 Thistype of driver make use of Java
Native Interface(JNI) call on
database specific native client API.
These native client API are usually
written in C and C++.
 Advantages ::-
-Faster as Compared to Type-1
Driver.
-Contains additional features.

 Disadvantages ::-
-Required native library.
-Increased cost of Application.
 This driver translate the JDBC
calls into a database server
independent and Middleware
server-specific calls. Middleware
server further translate JDBC
calls into database specific calls.

 Type-3Driver also known as


Middleware driver.
 Advantages ::-
-Does not required any native
library to be installed.
-Database Independency.
-Provide facility to switch over
from one database to another
database.
 Disadvantages ::-
-Slow due to increase number of
network call.
This is Driver called Pure Java
Driver because. This driver interact
directly with database. It does not
require any native database library,
that is why it is also known as Thin
Driver.

Type-4 Drivers also known as Pure


Java Driver.
 Advantages ::-
-Does not required any native
library.
-Dose not required any
Middleware server.
-Better Performance than other
driver.

 Disadvantages ::-

You might also like