Package Aids Java, XML Developers

Technology enabling Java application developers to connect to database data has taken a step forward with the publication of the Java Database Connectivity 3.0 standard in February.

Technology enabling Java application developers to connect to database data has taken a step forward with the publication of the Java Database Connectivity 3.0 standard in February.

Longtime database driver manufacturer DataDirect Technologies Inc. (formerly Merant plc.) is the first out of the gate with its set of JDBC 3.0-compliant database drivers for all the major databases. DataDirect is also the author of the JDBC driver that Microsoft Corp. will ship for its SQL Server database in the next few months.

Connect JDBC 3.0, which started shipping last month, provides a number of advanced database access features required for JDBC 3.0 compliance, such as updatable binary large objects, prepared statement pooling, transaction savepoints and prepared statement parameter metadata. Developers who are pushing the limits of the free JDBC drivers provided by many database vendors will find these third-party drivers allow for more sophisticated Java programming.

Connect JDBC 3.0 also includes three developer tools that eWeek Labs found very useful when testing the drivers. Top on our list is JXTransformer, an XML-to-relational database import and export library that, despite graphical tool bugs, is still a good step forward for those doing database work with XML. Two other tools—a JDBC statement tester and a JDBC connection trace tool—will be valuable to developers or database administrators trouble-shooting database problems.

The software also includes a new database connection pool manager. Low-end application servers such as The Apache Software Foundations Apache Tomcat dont include connection pooling, and this feature is such a performance enhancer that no one should deploy Web applications without it.

The Connect JDBC 3.0 package includes JDBC drivers for IBMs DB2 6.1 or later on Windows, Unix, OS/390 and z/OS (DB2/400 isnt supported but will be in a future release); IBMs Informix 9.1.4 or later on Windows or Unix; Oracle Corp.s Oracle 8.1.6 or later on Windows or Unix; Microsoft Corp.s Microsoft SQL Server 7.0 or later; and Sybase Inc.s Sybase Adaptive Server Enterprise 11.5 or later on Windows or Unix. Each of these five drivers is priced individually.

Connect JDBC 3.0s overall cost ranges from cheap to expensive depending on how widely its deployed. For individual developers, $145 per workstation per driver is inexpensive, given the tools that come with the product. For application server deployment, the drivers start at $2,500 each for a one- or two-CPU server—again, a fixed cost that will only be incurred a few times.

While price drops rapidly when volume goes up (50- to 99-workstation licenses are $95 each), installation of the driver will likely require copying it to each system and adding it to the systems Java class path. This is a lot of work with a lot of clients, especially since a free JDBC driver is installed automatically by the client database software installation routines that ship with most databases. (Java applets deployed in a browser download their software from a central location, so Connect JDBC would be easy to use with an applet.)

XML-Enabling a Database

Connect JDBC 3.0 has a new focus on XML in this release. The products JXTransformer component provides libraries to retrieve data in XML format or load XML data into a relational database in normal row-and-column format. JXTransformer uses a special query format to specify the mapping between XML node data (elements and attributes) and a relational table.

To make these queries easier to build, the software includes JXTransformer Builder, a graphical tool for building these query expressions. Using JXTransformer Builder, we entered a SQL query and then built a matching XML document structure, placing each term in the SQL query into the tree as an element or an attribute. We could simply drag nodes to the right place on the tree to control ordering and grouping.

JXTransformer expressions can then be used in Java code, or we could also just run them directly from the tool to see the resulting XML output.

We did have a problem running the tool under Java 1.4—we were not able to export XML data to a file unless we previously opened the Execute Query box, chose the To File option, closed the box and then opened it again. (The problem did not occur with Java 1.3.)

In addition, we werent able to use the feature to create an XML Schema document from our query, although we could create a Document Type Definition file describing the structure of output XML. After our feedback, DataDirect built a new version of this tool that fixed both these problems.

West Coast Technical Director Timothy Dyck can be reached at