Home > Content Writing, Software Applications, Technical Writing - IT > JDBC and JDBC drivers provided by Oracle

JDBC and JDBC drivers provided by Oracle

What is JDBC?

JDBC stands for Java Database Connectivity which is a kind of API that allows Java platform to access DBMS. This JDBC API consists of a set of interfaces and classes written in Java.

With this set of interfaces and classes, Java developers can establish connection with multiple databases and communicate directly to the database for performing various operations on them.

JDBC drivers provided by Oracle

Oracle provides 4 different types of JDBC drivers to use them under different installation and deployment scenarios. The 11.2.0 drivers can access Oracle 9.0.1 and higher versions. While all oracle JDBC drivers are almost similar, some features apply only to JDBC thin driver and some applies only to JDBC OCI drivers.

JDBC OCI (Oracle Call Interface):

With the help of Java Native Methods, this JDBC Type 2 driver calls entrypoints in an underlying C Library. This C library is called OCI which interact with an Oracle database. The JDBC OCI driver requires an Oracle client installation of the same version as the driver.

The use of native methods makes the JDBC OCI driver platform specific. Oracle supports Solaris, Windows, and many other platforms. This means that the Oracle JDBC OCI driver is not appropriate for Java applets, because it depends on a C library.

Starting from 10.1.0, the JDBC OCI driver is available for install with the OCI Instant Client feature, which does not require a complete Oracle client-installation. Please refer to Oracle Call Interface for more information.

JDBC Thin client-side driver

This is a JDBC Type 4 driver that uses Java to connect directly to Oracle. It implements Oracle’s SQL*Net Net8 and TTC adapters using its own TCP/IP based Java socket implementation. The JDBC Thin driver does not require Oracle client software to be installed, but does require the server to be configured with a TCP/IP listener.

Because it is written entirely in Java, this driver is platform-independent. The JDBC Thin driver can be downloaded into any browser as part of a Java application. (Note that if running in a client browser, that browser must allow the applet to open a Java socket connection back to the server.)

JDBC Thin server-side driver: This is another JDBC Type 4 driver that uses Java to connect directly to Oracle. This driver is used internally within the Oracle database. This driver offers the same functionality as the client-side JDBC Thin driver (above), but runs inside an Oracle database and is used to access remote databases.

Because it is written entirely in Java, this driver is platform-independent. There is no difference in your code between using the Thin driver from a client application or from inside a server.

JDBC Server-Side Internal driver

This is another JDBC Type 2 driver that uses Java native methods to call entrypoints in an underlying C library. That C library is part of the Oracle server process and communicates directly with the internal SQL engine inside calls and thus avoiding any network traffic. This allows your Java code running in the server to access the underlying database in the fastest possible manner. It can only be used to access the same database.

The use of native methods makes the JDBC Server-Side Internal driver platform specific. This server-side internal driver is fully consistent with the client-side drivers and supports the same features and extensions.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: