In Oracle8i we're taking a approach to allow developers
the flexibility of storing XML Documents in any way they
choose along the spectrum of:
Single, Indexed text-BLOB =3D=3D> Fully Expanded into Foreign-Key linked Tab=
les
The middle ground is that highly structured data gets mapped into
a set of related tables and structured text markup doc fragments
get mapped into text-BLOB's.
The simple example I use to show off why this might be interesting
would be to consider an Insurance Claim XML document like:
<?xml version=3D"1.0"?>
<InsuranceClaim>
<ClaimID>12345</ClaimID>
<LossCategory>7</LossCategory>
<Settlements>
<Payment>
<Payee>Borden Real Estate</Payee>
<Date>12-OCT-1998</Date>
<Amount>200000</Amount>
<Approver>JCOX</Approver>
</Payment>
</Settlements>
<DamageReport>
A massive <Cause>Fire</Cause> ravaged the building and
<Casualties>12</Casualties> people were killed. Early
FBI reports indicate that <Motive>arson</Motive> is
suspected.
</DamageReport>
</InsuranceClaim>
If you map the settlement payment sections into tables and columns
and the DamageReport doc fragment into a text blob, then you can
query over your datawarehouse of Insurance Claims to answer a
question like:
"How much money has Jim Cox approved to date in settlement
payments for arson-related fire claims? "
Using a straightforward SQL statement like:
SELECT SUM(csp.Amount)
FROM Claim_Header ch,
Claim_Settlements cs,
Claim_Settlement_Payments csp
WHERE csp.Approver =3D 'JCOX'
AND CONTAINS (DamageReport, 'Arson WITHIN Motive') > 0
AND CONTAINS (DamageReport, 'Fire WITHIN Cause' ) > 0
AND . . . /* Join Clauses */
We're participating in the W3C Query Language workshop today and tomorrow
(as well as follow-on W3C XML Query work) to help shape the eventual W3C
standard syntax for XML document queries. In the future, you may have
alternative syntaxes to answer the same questions of your enterprise
information, but this is our near term game plan.
____________________________________________________________________________=
Steve | Consulting PM & XML Technology Evangelist | smuench@oracle.com
Muench | Java Business Objects Dev Team | geocities.com/~smuench=
Oracle XML Homepage http://www.oracle.com/xml
--=_ORCL_11170990_0_0
Content-Type:message/rfc822
Date: 03 Dec 98 11:19:42
From:Kacper Nowicki <kacper@odi.com>
To:"Prashanth K. Salur" <xmldoubts@hotmail.com>, xml-dev@ic.ac.uk
Subject:Re: Xml and Object Database
Reply-to:UNX07.US.ORACLE.COM:kacper@odi.com
Return-Path:<owner-xml-dev@ic.ac.uk>
Received:from mailsun3 by usmail04 with SMTP (SMI-8.6/37.9) id LAA04132; Thu, 3 Dec 1998 11:39:25 -0800
Received:from inet16.us.oracle.com by mailsun3 with ESMTP (SMI-8.6/37.9) id LAA08597; Thu, 3 Dec 1998 11:39:24 -0800
Received:from bowmore.cc.ic.ac.uk (bowmore.cc.ic.ac.uk [155.198.5.22]) by inet16.us.oracle.com (8.8.5/8.8.5) with SMTP id LAA06827; Thu, 3 Dec 1998 11:40:15 -0800 (PST)
Received:from majordom by bowmore.cc.ic.ac.uk with smtp (Exim 1.58 #2) id 0zleVr-0002YC-00; Thu, 3 Dec 1998 19:34:07 +0000
Received:by ic.ac.uk (bulk_mailer for ic.ac.uk v1.7); Thu, 3 Dec 1998 19:30:20 +0000
Received:from majordom by bowmore.cc.ic.ac.uk with local (Exim 1.58 #2) id 0zleQw-0002Ly-00; Thu, 3 Dec 1998 19:29:03 +0000
Received:from punch.ic.ac.uk [155.198.5.17] by bowmore.cc.ic.ac.uk with smtp (Exim 1.58 #2) id 0zleOc-0002Fj-00; Thu, 3 Dec 1998 19:26:38 +0000
Received:from mineshaft.odi.com [198.3.16.17] by punch.ic.ac.uk with esmtp (Exim 1.62 #1) id 0zleOV-00037a-00; Thu, 3 Dec 1998 19:26:31 +0000
Received:from casper (kacperppp.odi.com [198.3.31.105]) by mineshaft.odi.com (8.8.8/EX3.5) with SMTP id OAA10259; Thu, 3 Dec 1998 14:24:12 -0500 (EST)
Message-Id:<4.1.19981203111638.00a4b9e0@mailhost.odi.com>
X-Sender:kacper@mailhost.odi.com
In-Reply-To:<19981203154859.29520.qmail@hotmail.com>
Sender:owner-xml-dev@ic.ac.uk
Precedence: bulk
MIME-Version: 1.0
Content-Type:text/plain; charset=us-ascii
Content-Transfer-Encoding:7bit
At 07:48 AM 12/3/98 -0800, Prashanth K. Salur wrote:
>Hi All,
>While creating an Object database for an XML file, is it advisable to
>store just the root node of the XML file or store each node of the XML
>file seperately.
It depends on what you plan to do.
If you want to run a query on XML document content, you'll be better off
storing each node separately.
If you will send this document to other recipent without any processing, I
guess you can store it as a (Unicode) String.
Kacper
--=_ORCL_11170990_0_0--