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

Chapter 8: SQLJ Part 2 (SQL Types Using the Java Programming Language)

8.1 Introduction

In Chapter 6 we showed you how Java classes (in JAR files) can be installed in a database. Some of the static methods in these classes can be associated with SQL routines (functions and procedures), and then invoked in the same manner that all SQL routines can be invoked. Well, that feels like a good start, but what about the constructors and all of the other methods in these classes? Are they to be treated as second-class citizens, available only by first going through some static method? Certainly not! In this chapter we will show you how SQLJ Part 2 allows you to associate Java classes with SQL structured types. Once this type of association has been made, these structured types are used in the same manner that all structured types are used. Since the previous chapter covered structured types quite thoroughly, we will concentrate in this chapter on how these associations are made.

Like SQLJ Part 1, SQLJ Part 2 [1] was brought to the SQLJ group of companies by Sybase, and the Sybase representative has acted as the editor of this specification. At the time we are writing this book, SQLJ Part 2 has not yet been submitted to NCITS. When this submission happens, we are hopeful that its adoption will be as quick and uneventful as that of SQLJ Part 1.

[1] SQLJ Part 2: SQL Types Using the Java Programming Language, www.sqlj.org, March 17, 1999.

8.2 Associating a Class and a Structured...

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.