Sharing structured data

XML Magazine

Subscribe to XML Magazine: eMailAlertsEmail Alerts newslettersWeekly Newsletters
Get XML Magazine: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


XML Authors: Jnan Dash, Jayaram Krishnaswamy, Jason Bloomberg, Chris Pollach, Peter Silva

Related Topics: XML Magazine

XML: Article

Are We On The Cusp Of A Paradigm Shift?

Are We On The Cusp Of A Paradigm Shift?

For the past 20+ years SQL has been the predominant query language, but is it now time for a change? The W3C XML Query Workgroup was chartered to develop a query language for XML. It was formed by a large group of companies, each with a wide range of objectives for their particular products. In my opinion, these companies fall into two camps: the data-centric or traditional database and the document-centric. However, there's no real definable dividing line since many companies blur the line on some of the issues.

Since SQL has dominated the database industry, can it be the basis of an XML query language by extending SQL functionality? There's no easy answer. The data model for a relational or object-relational database is not exactly the model found in typical XML documents.

If extending SQL were the answer, then two groups, the ANSI NIITS H2 Database Language Committee and the ISO/JTC1/ SC32/WG3 Database Language Workgroup, would be the logical places for this work to occur. The problem, though, is not one of data storage and data manipulation within a traditional database environment, but of data-centric documents. Thus we need to address the proper query mechanisms' questions within the W3C's XML activities.

The work to define an XML query language needs to take place within the architecture domain of the XML Query Workgroup, chaired by Paul Cotton of Microsoft. He's been involved with the development of the ISO SQL Standards for a number of years, often heading delegations from Canada's SC32. Paul has also been the secretary of the ISO's SC32/WG3 and continues his Canadian SC32 work.

Other participants in the XML Query Workgroup are also involved in the ANSI and ISO standards activity, including the current editor of the SQL Standards, Jim Melton from Oracle, the past SQL editor from Sybase, and one of the chief architects of the original SQL language from IBM. Three other members of the Workgroup are current members of the ANSI and ISO SQL Standards activity. There's strong representation from the database vendors and a strong commitment to develop and implement the W3C's XML Query Recommendation's query language as part of their product offerings.

All the major database vendors currently offer XML integration within their product lines; however, there's no standard way to handle this integration. The major benefit will be when all databases and middleware support a standard XML query language. Today, most vendors are using a combination of XPath and XSLT as the basis for their XML queries within their products. This may be a short-term solution, as it won't unify the database products and the XML query products.

I don't believe there will be a shift away from the relational or object-relational database models in the near future. XML native databases are in the works, but there will always be hierarchical, network, relational, and object-relational databases that will integrate XML data within their storage. This is the key to the need for a specialized XML query language, a universal XML query language that's independent of the underlying data storage mechanisms used by the different database models.

When the relational model arrived on the scene, there were expectations that the other models would vanish. Today, IBM has a billion-dollar market for its hierarchical data model products, so XML databases will never replace the other data models.

Where are we in the process of developing an XML query language? To date the XML Query Workgroup has developed three documents for public review:

I must remind you that this is a very dynamic process, and the Workgroup voted other documents to become public at its last face-to-face meeting held in London in January 2001. However, I can only discuss what's on the public portion of the W3C's Web site. By the time this column is published, there will be other documents ready for public review.

For the process to be effective there needs to be a public review of the work that goes on within the W3C's working groups. Comments to the XML Query Workgroup can be addressed to [email protected]

The Workgroup maintains the comments, and reviews them throughout the process of developing its query recommendations. To make cogent comments, you may need to do some work to ground yourself in the technology.

One of the best sources can be found on the Public XML Query Web page, www.w3.org/XML/Query, in particular, the URL under Other Pointers to the Query Languages 98 Workshop, www.w3.org/TandS/QL/QL98/.

Many papers presented at the workshop have been instrumental in the work within the group and are a good source of background material.

Next, review the XML query requirements and any recommendation that emerges from the XML Query Workgroup must be tied to them. When making comments to the Workgroup, always refer to the XML Query Requirements to see what the current requirements are. Again, this is a dynamic document, but don't expect major changes to take place. Any changes will be in the form of refinements to the document.

The editors for the XML Query Requirements are Don Chamberlin (IBM Almaden Research Center), Peter Fankhauser (GMD-IPSI), Massimo Marchiori (W3C/MIT/UNIVE), and Jonathan Robie (Software AG).

The XML Query Data Model document lays the type foundation for the query language. The data model developed in this document takes into account the other XML activities occurring among the W3C's XML Activities, which, at this time are different from XML Query. This document is more difficult to digest but can be understood by a wider audience. This is one of the first efforts to make the XML Query Language efforts an exercise in formal language development. Not all languages take a formalization approach to language development (e.g., SQL does not).

The XML Data Model editors are Mary Fernández (AT&T Labs) and Jonathan Robie (Software AG).

The next document is the real basis for the language formalization efforts within the Workgroup. The XML Query Algebra document is a difficult document. I personally had to invest major amounts of time to understand it. The following is a list of books I used to help me understand this document and others that will enter the public review process from both the XML Query and XML Schema workgroups.

To gain a general background in logic:

  • Suppes, P. (1957). Introduction to Logic. Dover Publications, Inc.
  • Tarski, A. (1995). Introduction to Logic and the Methodology of Deductive Sciences. Dover Publications, Inc.

    For more in-depth research:

  • Huth, M., and Ryan, M. (2000). Logic in Computer Science: Modeling and Reasoning About Systems. Cambridge University Press.
  • Cousineau, G., and Mauny, M. (1998). The Functional Approach to Programming. Cambridge University Press.
  • Pierce, B.C. (1991). Basic Category Theory for Computer Scientists. MIT Press.

    The one key resource:

  • Mitchell, J.C. (1998). Foundations for Programming Languages. MIT Press.

Depending on your experience, you can start with Foundations for Programming Languages to gain the background to understand the XML Query Algebra document. I had to take the long approach and studied these books in the order listed. It's a lot to invest to understand the one document; however, I see more formalization efforts occurring in the W3C, so I think the investment will pay off in the end.

The XML Query Algebra editors are Peter Fankhauser (GMD-IPSI), Mary Fernández (AT&T Labs, Research), Ashok Malhotra (IBM), Michael Rys (Microsoft), Jérôme Siméon (Bell Labs, Lucent Technologies), and Philip Wadler (Avaya Communication).

There's another XML Query effort taking place - the SQLX Working Group, www.sqlx.org/. It's a group of companies, many of which are database vendors working on standards that will eventually find their way to the ANSI and ISO committees. This is not an organization, but rather a group of interested companies working together for a common goal, the inclusion of XML technologies into the SQL Standards. These efforts are similar to the SQLJ.org efforts, which produced the SQL/OLB Java Object Language Bindings as part of the SQL Standards for what was once known as SQLJ Part 0. The SQLJ Parts 1 and 2 are now going through the ISO process.

The SQLX efforts are not in competition with the XML Query efforts taking place within the W3C, but should be seen as complementary.

In future columns I'll look in-depth at each of these documents and the ones to follow. Keep in mind that XML Query is a work in process, and now is when you should become involved if you're going to get a jump-start on this needed technology as it emerges in the months and years to come.

More Stories By Charles Campbell

Charles Campbell is
senior standards and language architect at Informix. He was a
contributor to WROX Press's Professional ASP Programming 3.0 and has several degrees in electronic engineering, business administration, and English.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.