Abstract
Many Java applications exchange data as XML, but store and query data using SQL against a traditional relational database. Unfortunately, XML and SQL represent information in very different ways, and many developers spend significant effort converting between the two formats.
When producing XML for exchange, developers need a portable way to build hierarchical XML structures using queries on a set of unordered, two-dimensional tables. Similarly, they need a way to update the content of their two dimensional tables using data found in XML hierarchies.
SQL/XML, part of the proposed SQL 2003 standard, is an extension to the SQL standard that allows XML to be generated as the result of a query, and adds an XML data type to SQL so that XML query results can be returned in the columns of normal SQL result sets. Using standard SQL/XML instead of custom-coded solutions or proprietary vendor extensions greatly simplifies development, provides for more maintainable code, and allows portability across databases.
For developers who already know and use SQL, SQL/XML is easy to learn and is one of the simplest approaches to creating XML from relational data. It is also extremely powerful, allowing the full power of SQL to be combined with the ability to create any desired XML structure from query results. SQL/XML is simple to use, leverages existing SQL knowledge, and makes it possible to write portable applications when used with a JDBC connection.
After introducing SQL/XML, the presenters will discuss DataDirect Connect for SQL/XML, a portable, cross-platform implementation of SQL/XML that allows JDBC programs to generate XML from SQL queries against most major databases. DataDirect Connect for SQL/XML gives developers a consistent, standards-based approach to creating XML from relational data or updating relational data from XML input.
The presenters will take a simple usage scenario and show how a Java program might generate XML from a relational database. They will provide code examples for various solutions - including Connect for SQL/XML, a representative proprietary database extension, and hand coding - and compare the portability, efficiency, and ease of implementing each solution.
Keywords
Since this was a product presentation, no paper was prepared for the proceedings.
![]() ![]() |
Design & Development by deepX Ltd. |