Java Reference
In-Depth Information
Application Space
Java Application
JDBC Driver
SQL Command
Result Set
Application Server
Proprietary Protocol
The three-tier JDBC model.
Type 1: JDBC-ODBC Bridge, Plus ODBC Driver
The first type of JDBC driver is the JDBC-ODBC Bridge. This driver type is provided by Sun
with the JDK 1.1 and later. It provides JDBC access to databases through Open Database
Connectivity (ODBC) drivers. The ODBC driver must be configured on the client for the
bridge to work. This driver type is commonly used for prototyping or when there is no JDBC
driver available for a particular Database Management System (DBMS). Figure 7.3 shows the
driver interaction of the JDBC-ODBC Bridge.
Type 2: Native-API, Partly Java Driver
The native-API driver converts JDBC commands into DBMS-specific native calls. This is
much like the restriction of Type 1 drivers, in that the client must have some binary code
loaded on its machine. These drivers do have an advantage over Type 1 drivers, because they
interface directly with the database. Figure 7.4 shows the interactions of a Type 2 driver.
Search WWH ::

Custom Search