New vendors and real support begin to add up in the Java database connectivity arena
In the year since its conception, JDBC, the object-oriented cousin of the ODBC specification from Microsoft, has attracted significant attention from corporate developers and providers of custom enterprise applications.
JDBC helps Java programs speak reliably and uniformly to relational database engines. Numerous middleware and database vendors are clamoring to provide JDBC drivers and middleware servers that speak JDBC. Intersolv, a leading middleware vendor, teamed with JavaSoft last June to deliver a JDBC-to-ODBC โbridgeโ driver.
A sure sign of JDBCโs increasing maturity is the growing number of โpure Javaโ JDBC drivers from database vendors, as well as third parties. Some, such as drivers from Connect Software, WebLogic, Sybase, Oracle, and Informix, are written entirely in Java, which offers the classic Java advantages of portability and automatic downloading in two-tier solutions, where the JDBC driver runs on the client.
JDBC is relatively straightforward. It consists of three interfaces: Connections, Statements, and Results. A typical operation would establish a connection with a database, execute a query against that database, and return a result set. For application and toolbuilders wanting database independence, special care should be taken to use database metadata methods, which some drivers are starting to support.
Three kinds of network configurations are possible: two-tier (client talking to database server), three-tier (employing a middleware server), or n-tier, which involves additional middleware layers. A configuration using JDBC in the middle tier, in which a servlet or server-side application uses a JDBC driver on a Web server or application server, will become increasingly popular, according to Mark Hapner, a senior staff engineer at JavaSoft. Hapner spoke on the state of JDBC as JavaOneโs three-day blitz was coming to a close.
JavaSoft is currently considering adding a rowset object to the JDBC specification; this would combine command and scrollable cursors, and provide optimistic concurrency and disconnected operation. The JDBC team is considering a few other additions, including:
- Basic batch updates
- Time interval data types
- Bookmarks
If you have suggestions regarding JDBC, send them to jdbc@wombat.eng.sun.com.
Intersolvโs John Goodson presented a series of programming tips for writing database-independent code (see the Resources section of this article).
JDBCโs coming out party
On April 3, JDBC had an official coming out when JavaSoft conducted an elaborate โBirds of a Featherโ JavaOne session at the Sheraton Palace. The session featured 12 vendors implementing JDBC drivers, including the big three database vendors โ Oracle, Informix, and Sybase. Other presenters included Visigenic, Intersolv, Bluestone, Caribou Lake Software, Connect, IBM, WebLogic, SCO, and OpenLink.
Oracle mentioned its J/SQL product, developed with IBM and Canon, which deals with Java stored procedures and works with a Java virtual machine inside the RDBMS engine. This approach is ideal for the many cases in which a database schema is not dynamic. Sybase hinted at moves toward putting Java in the database engine as well. Informix unofficially mentioned stored procedures and a richer set of capabilities inside the database server.
Since it acquired Illustra last year, Informix has focused on its new object-relational engine, Informix Universal Server. Unlike the other vendors, Informix has implemented a more general Java API, on which its JDBC driver is built.
The Q & A part of the session elicited some unusual debate. Mark Edwards of OpenLink advocated the move toward scrollable cursors, the lack of which he says caused initial slowness with ODBC acceptance. Caribou Lake Software could not see the usefulness of scrollable cursors, though it would seem to be a useful tool for dealing with large result sets.
Mike Davis, a developer at Perspective Software, pointed out an ideological โmis-matchโ between Java and JDBC. Java enables multithreaded applications, and yet most uses of JDBC involve a small number of efficient connections to a database server. Connect Software responded that technically advanced drivers should multiplex user connections โ transparently. Caribou Lake Software advocated the viewpoint that the developer may wish to control multiplexing. Oracle presented the notion that the cost per connection could vary considerably, as testing at Oracle has accommodated up to 10,000 concurrent users.
Rob Rucker of Arizona State noted that he wanted help with complex visual data. Even as new data types are being established with object-relational approaches, and the elusive SQL 3 standard is being drafted, the panel concluded that certain kinds of hierarchical data structures tax the capabilities of tabular data structures in RDBMS engines.


