Oracle8i JDBC Developer's Guide and Reference
Release 3 (8.1.7)

Part Number A83724-01





Go to previous page Go to beginning of chapter Go to next page

Overview of the Oracle JDBC Drivers

This section introduces the Oracle JDBC drivers, their basic architecture, and some scenarios for their use.

Oracle provides the following JDBC drivers:

Figure 1-1 illustrates the driver-database architecture for the JDBC Thin, OCI, and server-side internal drivers.

The rest of this section describes common features of the Oracle drivers and then discusses each one individually, concluding with a discussion of some of the considerations in choosing the appropriate driver for your application.

Figure 1-1 Driver-Database Architecture

Common Features of Oracle JDBC Drivers

The server-side and client-side Oracle JDBC drivers provide the same basic functionality. They all support the following standards and features:

Generally speaking, the only differences between the drivers are in how they connect to the database and how they transfer data.


  • The server-side internal driver supports only JDK 1.2.x.

  • Most JDBC 2.0 functionality, including that for objects, arrays, and LOBs, is available in a JDK 1.1.x environment through Oracle extensions.

  • Starting with release 8.1.6, JDK 1.0.2 is no longer supported.


JDBC Thin Driver

The Oracle JDBC Thin driver is a 100% pure Java, Type IV driver. It is targeted for Oracle JDBC applets but can be used for applications as well. Because it is written entirely in Java, this driver is platform-independent. It does not require any additional Oracle software on the client side.

For applets it can be downloaded into a browser along with the Java applet being run. The HTTP protocol is stateless, but the Thin driver is not. The initial HTTP request to download the applet and the Thin driver is stateless. Once the Thin driver establishes the database connection, the communication between the browser and the database is stateful and in a two-tier configuration.

The JDBC Thin driver allows a direct connection to the database by providing an implementation of TCP/IP that emulates Net8 and TTC (the wire protocol used by OCI) on top of Java sockets. Both of these protocols are lightweight implementation versions of their counterparts on the server. The Net8 protocol runs over TCP/IP only.

The driver supports only TCP/IP protocol and requires a TNS listener on the TCP/IP sockets from the database server.


When the JDBC Thin driver is used with an applet, the client browser must have the capability to support Java sockets.  

Using the Thin driver inside an Oracle server or middle tier is considered separately, under "JDBC Server-Side Thin Driver" below.

JDBC OCI Drivers

The JDBC OCI drivers (OCI8 for Oracle8/8i and OCI7 for Oracle7) are Type II drivers targeted for client-server Java applications programmers. They require an Oracle client installation, so are Oracle platform-specific and are not suitable for applets.

The OCI drivers, written in a combination of Java and C, convert JDBC invocations to calls to the Oracle Call Interface (OCI), using native methods to call C entry points. These calls are then sent over Net8 to the Oracle database server.

These drivers use the OCI libraries, C-entry points, Net8, CORE libraries, and other necessary files on the client machine on which they are installed.

The OCI drivers provide the highest compatibility with the different Oracle 7, 8, and 8i versions. They also support all installed Net8 adapters, including IPC, named pipes, TCP/IP, and IPX/SPX.

JDBC Server-Side Thin Driver

The Oracle JDBC server-side Thin driver offers the same functionality as the client-side Thin driver, but runs inside an Oracle database and accesses a remote database.

This is especially useful in two situations:

There is no difference in your code between using the Thin driver from a client application or from inside a server.


Statement cancel() and setQueryTimeout() methods are not supported by the server-side Thin driver.  

JDBC Server-Side Internal Driver

The Oracle JDBC server-side internal driver supports any Java code that runs inside an Oracle database, such as in a Java stored procedures or Enterprise JavaBean, and must access the same database. This driver allows the Java virtual machine (JVM) to communicate directly with the SQL engine.

The server-side internal driver, the JVM, the database, the KPRB (server-side) C library, and the SQL engine all run within the same address space, so the issue of network round trips is irrelevant. The programs access the SQL engine by using function calls.

The server-side internal driver is fully consistent with the client-side drivers and supports the same features and extensions. For more information on the server-side internal driver, see "JDBC in the Server: the Server-Side Internal Driver".

Choosing the Appropriate Driver

Consider the following when choosing which JDBC driver to use for your application or applet:

Go to previous page
Go to beginning of chapter
Go to next page
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.