There are Four types of JDBC Drivers
Type1 - JDBC-ODBC bridge plus ODBC
driver(Bridge):
The JDBC type 1 driver, also
known as the JDBC-ODBC bridge, is a database driver
implementation that employs the ODBC driver to connect to the
database. The driver
converts JDBC method calls into
ODBC function calls. As a result, this kind of driver
is most appropriate on a corporate network where client
installations are not a major
problem, or for
application server code written in Java in a three-tier
architecture.
Type 2 - Native-API partly-Java
driver(Native):
The JDBC type 2 driver, also
known as the Native-API driver, is a database driver
implementation that uses the client-side libraries of the
database. The driver converts
JDBC method calls into
native calls of the database API.This kind of driver
converts
JDBC calls into calls on the client API for
Oracle, Sybase, Informix, IBM DB2, or other DBMSs.
Type 3 - JDBC-Net pure
Java driver(Middleware):
The JDBC 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 (application server) converts
JDBC calls
directly or indirectly into the
vendor-specific database protocol. This driver translates
JDBC calls into a DBMS-independent net protocol, which is then
translated to
a DBMS protocol by a server.
Type 4 -
Native-protocol pure Java driver(Pure):
The
JDBC type 4 driver, also known as the Direct to Database Pure Java
Driver, is a database
driver implementation that
converts JDBC calls directly into a vendor-specific database
protocol.
This kind of driver converts JDBC calls directly into
the network protocol used by DBMSs.
This allows a direct
call from the client machine to the DBMS server and is an
excellent
solution for intranet access.
So Driver categories 3 and 4 are
the preferred way to access databases using the JDBC
API.