What is a JDBC driver?

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:
JDBC-ODBC bridge plus ODBC driver, also called Type 1 driver
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.

Native-API, partly Java driver, also called Type 2 driver
Converts JDBC API calls into DBMS-specific client API calls

Like the bridge driver, this type of driver requires that some binary code is loaded on each client computer.

JDBC-Net, pure-Java driver, also called Type 3 driver
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.

Native-protocol, pure-Java driver, also called Type 4 driver
Converts JDBC API calls directly into the DBMS-specific network protocol without a middle tier

This driver allows the client applications to connect directly to the database server.