Understanding SQL & Java Together: A Guide to SQLJ, JDBC, and Related Technologies

Chapter 5: SQLJ Part 0 (Embedding SQL in Java)

5.1 Introduction

We've done our preparation in the preceding chapters, so now it's time to get to the heart of our subject matter: using SQL and Java in a single application. One of the most basic ways to accomplish this task is to write a Java program that executes some SQL statements that are coded along with the Java statements in other words, embedding SQL in Java.

SQLJ Part 0 allows SQL statements to be embedded in Java programs. We've looked at JDBC, which provides for the dynamic execution of SQL statements. The raison d' tre for SQLJ Part 0 is the support of static SQL statements.

Before we completely focus on the details of SQLJ Part 0, we'll discuss how the group of SQLJ standards came about. We'll show a simple example of using SQLJ Part 0, followed by an in-depth discussion of each of its features. Later in the chapter, we'll discuss SQLJ Part 0 Translators in general, and we'll specifically discuss the Oracle SQLJ Part 0 reference implementation. After all of this is covered, we'll finish up by pointing out the advantages that SQLJ Part 0 brings you in the development of applications.

In this chapter, we'll provide many examples of SQLJ Part 0 and discuss its features in a high level of detail. We've included the definition of classes and interfaces provided by SQLJ Part 0 at the end of this chapter. The complete syntax of SQLJ Part 0 is presented in Appendix E. You'll need this...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Bug Tracking Software
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.