Oracle8i Application Developer's Guide - XML
Release 3 (8.1.7)

Part Number A86030-01

Library

Solution Area

Contents

Index

Go to previous page Go to beginning of chapter Go to next page

Introduction to Oracle XML, 15 of 27


Use a Hybrid Storage Approach for Better Mapping Granularity

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.

A Hybrid Approach Allows for User-Defined Granularity for Storage

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.

Figure 1-3 Hybrid Approach: Querying Top Level Elements in Tables While Contents are in a CLOB


Hybrid Storage Advantages

The advantage of the hybrid storage approach for storing XML documents, is the following:


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Solution Area

Contents

Index