A JDBC driver (Java Database Connectivity driver) is a small piece of software that allows JDBC to connect to different databases.
Essentially, a JDBC driver makes it possible to do three things:
- Establish a connection with a data source.
- Send queries and update statements to the data source.
- Process the results.
Once loaded, a driver connects to a database by providing a specifically formatted URL that includes the port number, the machine and database names. The JDBC API can then connect Java applications through the appropriate driver for the given database.
JDBC actually has two levels of interface. In addition to the main interface, there is also an API from a JDBC manager that in turn communicates with individual database product drivers, the JDBC-ODBC bridge if necessary, and a JDBC network driver when the Java program is running over a network to access a remote database.
Web app developers use JDBC drivers to enable connectivity to different databases for their apps.