IN 1993 MICROSOFT first demonstrated Cairo, based on a prototype of its Object File System. The concept is slated to return, as Yukon, in 2003. Meanwhile, the industry hasn't been sitting on its thumbs. Database vendors have been busily converging the two major data-management disciplines: SQL and XML. One of the more forward-looking efforts is Virtuoso, from OpenLink Software.
Virtuoso packs more technology into one product than seems possible. It was first sold as a virtual database -- that is, a stand-alone SQL engine that could also use (and extend) foreign data sources. It evolved into a Web application server and now, in Version 2.7, has become as complete an example of a universal server as you are likely to find. Virtuoso 2.7, available for Windows, Linux, Solarix, HP/UX, AIX, and Mac OS X, creates a profound synthesis of SQL and XML data management styles, and wraps Web-services bindings around both. The SQL engine at the core of the product can contain structured data, as well as semistructured data (i.e. XML) and unstructured data (files, images). There's also a tightly integrated WebDAV (Web Distributed Authoring and Versioning) datastore that offers hierarchical access to semistructured and unstructured data.
Here's one example of how these pieces can fit together. A SQL query is defined, using the FOR XML clause to produce XML output. The query's results are routed through Virtuoso's built-in XSLT (Extensible Stylesheet Language Transformations) engine, transformed to HTML, and stored in a DAV folder. The HTML report is now available to DAV clients, or to browsers by way of Virtuoso's HTTP-based DAV interface.
If the query is defined as real time then the result file will seem empty, because it's just a placeholder; the query will generate the report in real time. Alternatively the query can be defined as persistent. In this case the result file is created, and then refreshed automatically at an administrator-defined interval. The query can optionally produce metadata (either a Document Type Definition or an XML Schema definition) describing the structure of the output. Note that except for writing the SQL query, there's no programming required to achieve these effects. It's all done in Virtuoso's Web-based administration tool.
A Virtuoso SQL query can draw on an extremely rich set of resources. Tables and stored procedures may be internal, or attached from Microsoft SQL Server or Oracle. Columns that store character data can be indexed for full-text search. When the character data is XML, XPath syntax is available for structure-aware queries.
Here's a query that returns just the first title from each of a set of XML documents, using the xpath_contains predicate: select XT_FILE, cast (p as varchar) descr from XML_TEXT2 where xpath_contains (XT_TEXT, '//title [position()= 1]',p)
Virtuoso's stored-procedure language, Virtuoso/PL, extends the product's reach to include virtually any Internet-accessible data: remote SQL databases, Web pages, e-mail inboxes, newsgroups, and SOAP (Simple Object Access Protocol) services. The SOAP client support includes direct SOAP calls, importation of WSDL (Web Services Description Language) wrappers, and UDDI (Universal Description Discovery and Integration) look-ups.