Oracle is a relational database system that takes into account new requirements that emerged in the area of managing XML documents. We described in this chapter the comprehensive support for XML that Oracle provides in Version 9i, Release 1.
The chapter's main focus is put on the storage and retrieval of XML documents in a database: The essential building blocks are the XML SQL Utility (XSU), the new XMLType object type, and the OracleText cartridge. XSU is useful when XML documents are distributed among several tables and columns in a fine-grained manner. The other way around, table data can be used to construct XML documents in a powerful and flexible manner. The XMLType object type pursues a different approach and encapsulates XML documents in Large Objects (LOBs); hence, the documents are stored as a whole unit. Methods provide typical XML functionality such as qualifying documents by XPath queries and extracting document parts. In addition, OracleText supports full text retrieval capabilities including support for XPath.
Furthermore, Oracle contains other useful tools such as XML parsers for the DOM and SAX interfaces and class generators for building XML documents programmatically.
Nevertheless, some important concepts that have been discussed in the database/XML community quite recently are still missing in Oracle. For example, Xperanto (Carey et al. 2000; Shanmugasundaram et al. 2001) publishes relational data as XML views that can be queried and translates arbitrarily complex XQuery statements into executable SQL. XQuery is an emerging standard for a pure XML world defined by the W3C XML Query Language Working Group. It offers XML-only querying wherever a document may be, in databases, files, or messages. Pushing most of the query evaluation down into the SQL engine, XML-based queries can be optimized and efficiently executed. XSU principally behaves in a similar way but does not support yet the XQuery language, neither for XMLType objects, nor for XML views. Also the ability to query XMLType with SQL is still limited.
Oracle's XML DB, which is now available in Oracle9i Release 2, provides solutions to some of these points. The object type XMLType can be used transparently, no matter whether data is stored in CLOBs or in table columns. Hence even relational tables can be queried with XPath. Furthermore, XML DB promises to support an early prototype of XQuery, although the complete W3C recommendation is expected in late 2002. XDB will introduce enhanced native XML storage. The development on the product and research is shaped by ongoing standardization activities, in which a new part of the SQL standard, called SQL/XML (Eisenberg and Melton 2001), was created by the SQLX group as an emerging part of the ANSI and ISO SQL standards. Currently a working draft, the SQL/XML specification has as its major goal to create a "well-defined relationship between XML and SQL." SQL/XML is an extension to SQL to include processing of XML data. Oracle XDB aspires to be the first implementation of SQL/XML. These extensions enable Oracle to develop in the direction of an XML repository.