The JDBC API defines the Java interfaces and classes that programmers use to connect to databases and send queries. A JDBC driver implements these interfaces and classes for a particular DBMS vendor.
A Java program that uses the JDBC API loads the specified driver for a particular DBMS before it actually connects to a database. The JDBC DriverManager class then sends all JDBC API calls to the loaded driver.
There are four types of JDBC drivers:
Translates JDBC API calls into Microsoft ODBC calls that are then passed to the ODBC driver
The ODBC binary code must be loaded on every client computer that uses this type of driver.
ODBC is an acronym for Open Database Connectivity.
Converts JDBC API calls into DBMS-specific client API calls
Like the bridge driver, this type of driver requires that some binary code be loaded on each client computer.
Sends JDBC API calls to a middle-tier server that translates the calls into the DBMS-specific network protocol
The translated calls are then sent to a particular DBMS.
Converts JDBC API calls directly into the DBMS-specific network protocol without a middle tier
This allows the client applications to connect directly to the database server.