Chapter 1

Section 1.1

Introducing the JDBC/ODBC eWay

About Java Database Connectivity (JDBC)

The pros and cons for using this type of driver are as follows:

Pros

ƒAllows access to almost any database since the database ODBC drivers are readily available

Cons

ƒPerformance is degraded since the JDBC call goes through the bridge to the ODBC driver then to the native database connectivity interface. The results are then sent back through the reverse process

ƒLimited Java feature set

ƒMay not be suitable for a large-scale application

Type II: Partial Java driver

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, this style of driver requires that some binary code 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.

Pros: Performance is better than that of Type 1, in part because the Type 2 driver contains compiled code that's optimized for the back-end database server's operating system.

Cons: User needs to make sure the JDBC driver of the database vendor is loaded onto each client machine. Must have compiled code for every operating system that the application will run on. Best use is for controlled environments, such as an intranet.

Type Two Driver

A native-API partly Java technology-enabled driver converts JDBC calls into calls on the client API for DBMSs. Like the bridge driver, this style of driver requires that some binary code be loaded on each client machine. An example of this type of driver is the Oracle Thick Driver, which is also called OCI (see JDBC/ODBC Drivers on page 117 regarding JDBC eWay support of Oracle drivers).

JDBC/ODBC eWay Adapter User’s Guide

9

Sun Microsystems, Inc.

Page 9
Image 9
Sun Microsystems JDBC/ODBC Adapter manual Type II Partial Java driver, Type Two Driver, Pros, Cons