XML 2003 logo

DataDirect Connect for SQL/XML: Generating XML from SQL Queries Using the SQL/XML Features of SQL 2003

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


1. Product Presentation Paper

Since this was a product presentation, no paper was prepared for the proceedings.

Biography

Jonathan Robie is the XML Program Manger at DataDirect technologies. He is also a co-inventor of XQuery, the W3C XML Query language, and is now an editor of many of the specifications which define the XQuery language. He is also a co-inventor of XQL, an earlier XML query language which was a predecessor of XPath. Jonathan has been significantly involved in several other W3C Working Groups, acting as an editor for documents produced by the XML Schema and Document Object Model Working Groups, and has also participated in the W3C XML Information Set and XML Stylesheet Language (XSL) Working Groups. He is well known in the XML world, both as an innovator and as a speaker.Prior to joining DataDirect, Jonathan worked as an XML Research Specialist at Software AG, where he helped design architectures for XML servers and represented Software AG on the XML Query and XML Schema Working Groups. He has been on the architecture team for three XML databases or repositories, at Software AG, Texcel Research, and POET Software. He has a total of 13 years experience with advanced database systems and complex database applications, especially object oriented databases, multimedia databases, workgroup database applications, and XML/SGML databases.

Nancy Vodicka is the JDBC and XML Product Marketing Manager for DataDirect Technologies. Nancy has over 15 years experience in the software industry creating and providing training in technologies such as XML, Web Services, relational databases, SQL, and other topics.