Open In App

JDBC – Type 2 Driver

A JDBC driver enables Java application to interact with a database from where we can fetch or store data. JDBC drivers are analogous to ODBC drivers. The JDBC classes are contained in the Java Package java.sql and javax.sql.JDBC helps to

The Java.sql package that ships with JDK contain various classes with their behaviors defined and their actual implementations are done in third-party drivers. Third-party vendors implement the java.sql.Driver interface in their database driver.



Type 2 or Partial Java driver: Also known as Native API converts JDBC calls into database-specific native libraries calls and these calls are directly understood by the database engine. This type of driver converts JDBC calls into calls on the client API for Oracle, Sybase, Informix, DB2, or other DBMS.



Note that, like the bridge driver or Type-1 driver, Also this driver requires some binary code to be loaded on each client machine.

This type of driver converts the calls that a developer writes to the JDBC application programming interface into calls that connect to the client machine’s application programming interface for a specific database, such as IBM, Informix, Oracle or Sybase.

Article Tags :