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

A Note from the Series Editor

Jim Gray, Microsoft Research

Database systems have been trying to add objects to their data stores for almost two decades. Each vendor has invented an object model and added it to its brand of SQL. The results have been mixed the extensions add great power, but the object model is typically not very well thought out and differences between the DBMS and the host programming language object models have just increased the impedance mismatch between them.

SQLJ embraces the Java object model and integrates it with the SQL language. It allows programs to manipulate SQL tables using SQL embedded in Java, it allows a persistent form of Java, it allows stored procedures written in SQLJ, and it allows the SQL system to store Java objects as values within tables. The resulting language is quite elegant. The benefits go beyond just the object-oriented extensions. Iterators nicely model cursors and loops, SQL nulls are modeled with the Java undefined value, and error handling is performed by the Java structured exception handling mechanism.

The result is a huge improvement in simplicity and productivity. Simple programs are indeed simple. Much of the tedium of ODBC/JDBC programming is subsumed by the unification of SQLJ. Unfortunately, dynamic SQL still requires something like ODBC/JDBC or ADO. Still, for most database programming tasks, SQLJ will be a huge advance.

Most DBMS vendors have directly participated in the design of SQLJ. Their products are beginning to support the language, and the standards bodies are in the process of standardizing...

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: Middleware
Finish!
Privacy Policy

This is embarrasing...

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