0% found this document useful (0 votes)
5 views

Mod5 8

Uploaded by

pp6524878
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Mod5 8

Uploaded by

pp6524878
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

JDBC Drivers

JDBC Driver is a software component that


enables java application to interact with the
database.
There are 4 types of JDBC drivers:
JDBC-ODBC bridge driver
Native-API driver (partially java driver)
Network Protocol driver (fully java driver)
Thin driver (fully java driver)
1) JDBC-ODBC bridge driver

The JDBC-ODBC bridge driver uses ODBC


driver to connect to the database.
 The JDBC-ODBC bridge driver converts
JDBC method calls into the ODBC function
calls.

Open Database Connectivity (ODBC) is a


standard application programming interface
(API) for accessing DBMS .
Advantages:
easy to use.
can be easily connected to any database.
Disadvantages:
Performance degraded because JDBC method
call is converted into the ODBC function calls.
The ODBC driver needs to be installed on the
client machine.
2) Native-API driver

The Native API driver uses the client-side


libraries of the database. The driver converts
JDBC method calls into native calls

A native method is a Java method whose


implementation is written in another
programming language such as C
Advantage:
Better performance than JDBC-ODBC bridge
driver.
Disadvantage:
The Native driver needs to be installed on the
each client machine.
3) Network Protocol driver

The Network Protocol driver uses middleware


(application server) that converts JDBC calls
directly or indirectly into the vendor-specific
database protocol.
 It is fully written in java

As the database protocol is vendor specific, it


requires separate drivers, supplied by vendor to
connect to different types of databases.
Advantage:
No client side library is required
Disadvantages:
Network support is required on client
machine.
Maintenance of Network Protocol driver
becomes costly
4) Thin driver

The thin driver converts JDBC calls directly


into the vendor-specific database protocol.
That is why it is known as thin driver. It is
fully written in Java language.
Advantage:
Better performance than all other drivers.
No software is required at client side or
server side.
Disadvantage:
Drivers depend on the Database.

You might also like