Oracle8i JDBC Developer's Guide and Reference
Release 8.1.5

A64685-01

Library

Product

Contents

Index

Prev  Chap Top Next

Oracle JDBC Drivers

This section has the following subsections:

Oracle offers two different drivers for client-side use (one of which can also be used in a middle tier) and one for server-side use. Most of the information in the following chapters focuses on the client-side drivers. The server-side driver is described in detail in "JDBC on the Server: the Server Driver".

Introducing the Oracle JDBC Drivers

This section describes the Oracle JDBC drivers and provides scenarios for how you would use them. Oracle produces JDBC drivers for use in clients and in the server. The client-side drivers can be used in Java applications or Java applets that run either on the client or in the middle tier of a three-tier configuration. The server-side driver provides server-side JDBC support which allows the Java VM to communicate with the SQL engine.

Common Features of Oracle JDBC Drivers

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

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

JDBC Thin Driver

The Oracle JDBC Thin driver is a 100% Pure Java implementation that complies with the JDBC 1.22 standard. The JDBC Thin driver uses Java Sockets to connect directly to the Oracle Server and is typically used for Java applets in either a two-tier or three-tier configuration, though it can also be used for Java applications. The JDBC Thin driver provides its own implementation of a TCP/IP version of Oracle's Net8. Because it is written entirely in Java, this driver is platform-independent. When the JDBC Thin driver is used with an applet, the client browser must have the capability to support Java sockets.

The JDBC Thin driver does not require Oracle software on the client side; it can be downloaded into a browser simultaneously with the Java applet being run. From the client (usually a browser), you select a URL from an HTML page that contains a Java applet tag. The web server downloads the Java applet and the JDBC Thin driver to the client. The JDBC Thin driver then establishes a direct connection to the database server using Java Sockets.

The JDBC Thin driver connects to any Oracle database of version 7.2.3 and higher. The JDBC Thin driver allows a direct connection to the database by emulating Net8 and TTC (the wire protocol used by OCI) on top of Java sockets. The driver supports only TCP/IP protocol and requires a TNS listener to be listening on TCP/IP sockets from the database server.

For a discussion of relevant firewall, browser, and security issues, see "Working with Applets".

JDBC OCI Driver

The JDBC OCI driver provides an implementation of the JDBC interfaces using the Oracle Call Interface (OCI). The OCI driver makes use of the OCI cache, C entry points to OCI, and the OCI library. The use of native methods to call C entry points makes the driver platform-specific. The JDBC OCI driver also requires an Oracle client installation including Net8.

The JDBC OCI driver is compatible with all Oracle versions because it interfaces to Oracle databases through OCI. The driver also supports all installed Net8 adapters, including IPC, named pipes, TCP/IP, and IPX/SPX.

Because the JDBC OCI driver contains C code, it is not suitable for use in applets. However, it is an excellent choice for Java applications or Java middle tiers such as the Oracle Web Application Server. You can use the JDBC OCI driver in these configurations:

JDBC Server Driver

Oracle's JDBC Server driver is for server-side use only. The Server driver provides server-side JDBC support for any Java program used in the database, Java stored procedure, Enterprise Java Beans (EJB) and for communication with SQL and PL/SQL programs. The Server driver is fully consistent with, and supports the same features and extensions as the client-side drivers. For more information on the server-side driver, see "JDBC on the Server: the Server Driver".

Choosing the Appropriate Driver

Four main considerations that you must bear in mind when choosing which JDBC driver to use for your application or applet are:




Prev

Top

Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index