|Oracle8i Application Developer's Guide - XML
Release 3 (8.1.7)
Part Number A86030-01
Introduction to Oracle XML, 22 of 27
In the previous section we discussed the following:
However, in many cases, you need better control of the mapping granularity.
For instance, when mapping a text document, such as a book, in XML, you may not want every single element to be exploded and stored as object-relational. Storing the font information and paragraph information for such documents in an object-relational format, does not serve any useful purpose with respect to querying.
On the other hand, storing the whole text document in a CLOB reduces the effective SQL queriability on the entire document.
The alternative is to have user-defined granularity for such storage. In the book example, you may want the following:
You can specify the granularity of mapping at table definition time. The server can automatically construct the XML from the various sources and decompose queries appropriately.
Figure 1-3 illustrates the Hybrid approach to storage.
The advantage of the hybrid storage approach for storing XML documents, is the following: