Primer: XQuery 1.0By Sean Gallagher | Print
Re-Imagining Linux Platforms to Meet the Needs of Cloud Service Providers
XQuery 1.0 is a language that allows users to search for and extract information from databases and documents. Here's how it works and who is using it.What is it?
A language that allows users to search for and extract information from databases as well as documents in which content is identified by tags based on the Internet's eXtensible Markup Language (XML).
What does it do?
XQuery makes it possible to pull data from multiple sources and merge it on screen at one time. That means data that reside in such relational databases as Oracle, IBM DB/2, Microsoft SQL or Sybase, or data from XML databases and documents can be combined instantly and used in a wide variety of Web-based applicationsfor example, supply chain management or corporate compliance systems.
Where did it come from?
XQuery 1.0 is a draft specification from the World Wide Web Consortium. Its predecessor, Quilt, was first defined in March 2000 by Don Chamberlin of IBM's Almaden Research Center, Daniela Florescu of France's INRIA research institute and Jonathan Robie, then at Software AG. As its original name implies, XQuery draws on a patchwork of features from earlier XML query languages along with such database query languages as Structured Query Language and Object Query Language.
What are its advantages?
Since XQuery can pull information from many places, less storage of data is required. XQuery also defines types of data (such as dates or totals), which can speed calculations and the search for data.
Application server and middleware vendors use these XQuery features to make their services work over a wide range of data sources. And XQuery is better suited to process XML data when it is stored within relational databases. Such databases generally treat XML data as either chunks of raw XML chopped up into database tables or as amorphous masses of data known as "binary large objects," or BLOBs.
What's the downside?
XQuery is still a draft standard, and "it's about a year away from approval," says Michael Champion, a research and development specialist at Software AG.
There are several early implementations of XQuery in XML-related databases, such as Software AG's Tamino and X-Hive Corp.'s X-Hive/DB. But XQuery has yet to be widely implemented in production products from the major database vendors. Major implementation work will fall to application server and middleware vendors such as Ipedo, WebMethods and BEA, which will have to stitch together relational and XML-based data sources.
Relational and XML database vendors are expected to deploy only the pieces of the "core" language that apply to their own products, using special extensions.
Who's using it?
XQuery is currently being used in a number of portal and integration products. British Telecom uses XQuery features of Ipedo's Information Hub to produce pricing documents that comply with government regulations. The U.S. Navy is using the same software to move personnel records from old data sources into an XML-based repository. Emory University is using XQuery with Software AG's Tamino to search metadata of the school library's poetry collection.
Future versions will probably incorporate extensions for searching plain-text documents and other data formats. Look for integration vendors to provide XQuery-based "adapters" for applications like Microsoft Word and Excel. This will provide instant access to company data in documents created on screen on the fly.
To find out if your clients can derive benefit from XQuery, take Baseline's online quiz.