Choosing a JDBC Driver
JDBC uses a driver manager to support different drivers, so that you can
connect to multiple database servers. To connect your database
application to a data server, you must have available the appropriate
JDBC driver. JDeveloper provides the Oracle Thin and OCI JDBC drivers.
OCI for Oracle is the default driver. If you wish you may install a
non-default JDBC driver.
Consider the following when choosing a JDBC driver to use for your
application or applet:
-
If you are writing an applet, you must use the JDBC Thin driver. JDBC
OCI-based driver classes will not work inside a Web browser, because
they call native (C language) methods.
Note: When the JDBC Thin driver is used with an applet, the
client browser must have the capability to support Java sockets.
-
If you want maximum portability and performance under Oracle8i
and earlier, then use the JDBC Thin driver. You can connect to an
Oracle server from either an application or an applet using the JDBC
Thin driver.
-
If you are writing a client application for an Oracle client
environment and need maximum performance, then choose the JDBC OCI
driver.
-
For code that runs in an Oracle server acting as a middle tier, use
the server-side Thin driver. (JDeveloper does not supply the
server-side Thin driver.)
-
If your code will run inside the target Oracle server, then use the
JDBC server-side internal driver to access that server. (You can also
access remote servers using the server-side Thin driver.) (JDeveloper
does not supply the JDBC server-side internal driver.)
-
If performance is critical to your application, you want maximum
scalability of the Oracle server, or you need the enhanced
availability features like TAF or the enhanced proxy features like
middle-tier authentication, then choose the OCI driver.
For more information, see the Oracle Database JDBC Developer's Guide
and Reference, available from the Oracle Database 10g
Documentation Library on the Oracle Technology Network (OTN) at
http://www.oracle.com/pls/db92/db92.homepage
.
Related topics
Embedding SQL in Java Programs
with JDBC
Modifying a
Project to Use a Non-Default JDBC Driver
Configuring Database Connections
Registering a New Third-Party JDBC Driver
Connection Requirements for Oracle's Type 2 JDBC Drivers (OCI)
Copyright © 1997, 2004, Oracle.
All rights reserved.