Product Documentation

FairCom JDBC Developer's Guide

Previous Topic

Next Topic

Types of JDBC Drivers

JDBC drivers can either be entirely written in Java so that they can be downloaded as part of an applet, or they can be implemented using native methods to bridge to existing database access libraries.

The Oracle JDK (previously known as "JavaSoft JDK™") defines four different types of JDBC drivers, as noted in the previous figure and outlined in the following sections.

The FairCom DB SQL JDBC Driver is a Type 4 driver.

In This Section

JDBC-ODBC Bridge Drivers

Native-Method Drivers

Network-Protocol All-Java Drivers

Native-Protocol All-Java Drivers (c-treeSQL JDBC Driver)

Previous Topic

Next Topic

JDBC-ODBC Bridge Drivers

Type 1 drivers translate calls to JDBC methods into calls to Microsoft Open Database Connectivity (ODBC) functions. Bridge drivers allow JDBC applications immediate access to database connectivity provided by the existing array of ODBC drivers.

Both the Oracle JDK (previously known as the "JavaSoft JDK™") and Microsoft Java SDK include JDBC-ODBC bridge drivers.

ODBC architecture requires that the ODBC driver manager and (typically) the ODBC drivers themselves be loaded on each client system. The requirement for software resident on client systems means that JDBC-ODBC bridge drivers will not work with Java applets run from an Internet browser. Browsers do not allow applets to run another program on the client to which they are downloaded. (In general, JDBC-ODBC bridge drivers will not work in environments that restrict Java applications from reading and writing files or running other programs.)

JDBC-ODBC bridge drivers are still useful in corporate networks, or for use by application server code written in Java in a 3-tier architecture. In such an environment, the application server has intermediary software, such as Blue Lobster’s Aptivity, that receives requests from browsers and other Internet applications. The intermediary software in turn calls the JDBC driver manager when it receives a database request.

Previous Topic

Next Topic

Native-Method Drivers

Type 2 drivers contain Java code that calls “native” C or C++ methods already implemented by database vendors.

Like an ODBC driver, a native-method driver must be installed on each client or server that uses it, and thus has the same limitations as the JDBC-ODBC bridge drivers. A typical use of native-method drivers is on application servers.

Previous Topic

Next Topic

Network-Protocol All-Java Drivers

Type 3 drivers are completely written in Java. They translate JDBC calls into a database-independent network protocol which is in turn translated to a DBMS protocol by middleware on a network server.

This type of driver can thus connect many Java clients to many different databases. The specific protocol used depends on the vendor.

Type 3 drivers are the most flexible since they do not require any driver software resident on client systems and can allow a single driver to provide access to multiple databases.

Previous Topic

Next Topic

Native-Protocol All-Java Drivers (c-treeSQL JDBC Driver)

Type 4 drivers are also written completely in Java, but do not rely on middleware. They convert JDBC calls directly into the network protocol used by a particular database. This approach allows a direct call from the client system to the database server. Also, since there is no client-resident software, it also is practical for Internet applications.

Type 4 drivers provide the best performance.

The FairCom DB SQL JDBC Driver is a Type 4 driver.

TOCIndex