Skip to Main Content
Oracle in a Nutshell
book

Oracle in a Nutshell

by Rick Greenwald, David C. Kreines
December 2002
Intermediate to advanced content levelIntermediate to advanced
928 pages
85h 29m
English
O'Reilly Media, Inc.
Content preview from Oracle in a Nutshell

Chapter 11. Java and Oracle

The growth in Java usage and popularity has been a key development in the computing world in recent years. Java’s cross-platform capabilities and object-oriented functionality have given it broad acceptance as a development and runtime platform. Since the introduction of Oracle8i, Java has been an integral part of the overall Oracle environment.

There are two basic ways to access Oracle data from Java:

SQLJ

A high-level language designed for embedding SQL statements into Java code. SQL statements used in SQLJ are checked at compile time. Up until Oracle9i, you could use SQLJ only for static SQL statements. With Oracle9i, you can now use SQLJ for both static and dynamic SQL statements.

JDBC

A Java API that typically involves more coding than SQLJ. The SQL statements used in JDBC code are checked at runtime, so it is more loosely typed than SQLJ.

Both of these interfaces are established standards for Java, and each has its own virtues—fewer statements to code with SQLJ, more control with JDBC. To some extent, use of either interface is a matter of personal choice, although Java, with its low-level programming orientation, tends to appeal to developers who are not deterred by the more detailed coding required with JDBC. You can even mix JDBC calls with SQLJ in the same program if you wish.

This chapter focuses on using Java to interface with Oracle databases. It covers the following:

  • Java drivers available for Oracle

  • Using Java within the Oracle database

  • Mapping ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Oracle Internals

Oracle Internals

Donald K. Burleson
Oracle PL/SQL

Oracle PL/SQL

Lewis Cunningham
Oracle Essentials: Oracle9i, Oracle8i and Oracle8, Second Edition

Oracle Essentials: Oracle9i, Oracle8i and Oracle8, Second Edition

Rick Greenwald, Robert Stackowiak, Jonathan Stern

Publisher Resources

ISBN: 0596003366Errata Page