Sign Up
1. Application: It is a java applet or a servlet that communicates with a data source.
2. The JDBC API: The JDBC API allows Java programs to execute SQL statements and retrieve results. Some of the
important interfaces defined in JDBC API are as follows: Driver interface , ResultSet Interface , RowSet Interface
PreparedStatement interface, Connection inteface, and Classes defined in JDBC API are as follows:
DriverManager class, Types class, Blob class, clob class.
3. DriverManager: It plays an important role in the JDBC architecture. It uses some database-specific drivers to
effectively connect enterprise applications to databases.
4. JDBC drivers: To communicate with a data source through JDBC, you need a JDBC driver that intelligently
communicates with the respective data source.
JDBC drivers
JDBC drivers are client-side adapters (installed on the client machine, not on the server) that convert requests from
Java programs to a protocol that the DBMS can understand.
JDBC drivers are the software components which implements interfaces in JDBC APIs to enable java application to
interact with the database.
There are four types of JDBC drivers:
Type-1 driver:
This driver acts as a bridge between JDBC and ODBC (Open Database Connectivity). It converts JDBC method calls
into ODBC calls and sends them to the ODBC driver.
Type-2 driver:
This driver converts JDBC calls into database-specific calls using native libraries provided by the database vendor. It is
also known as a partially Java driver because it relies on native code.
Report Abuse