[Sorry if this comes out RTF, but that's how it arrived, and I haven't
time to convert it!]
From: Steve Muench
Sent: 17 December 1998 18:50
To: [log in to unmask]
Subject: Re: storing XML documents on relatioanl database
| I have no theoretical knowledge on this, so probably cannot help.
| However, if our experience is of any use, I'd venture the following
| - The 'relational world' is useful for efficient storage of connected
| data. However, I would just treat it like a file-system. Build a layer
| on top of it and then forget about it. The Holy Grail is objects.
That's the point of view we offer with the Internet File System in
Oracle8i. It lets you define how your XML file gets stored, and then
lets you forget about the database part -- except when you want the
benefits of using SQL and Full-Text searching to search that sucker. :-)
I think SQL is not up to the task. For a start you have lost the data
structure. What about searching for an element in some objects but not
in others - authors of magazine articles but not books, for example. XML
should be able to be accessed by:
wheras with your approach I would guess you can only get:
In other words, you need some sort of XSL or better layer on top of your
data if you really want to take advantage of XML.
A massive <Cause>Fire</Cause> ravaged the building and
<Casualties>12</Casualties> people were killed. Early
FBI reports indicate that <Motive>arson</Motive> is
is a simplification of an actual XML document which came to use from
one of our customers in the Insurance Industry. I don't understand why
you want to pack duplicate information into element attributes.
I'm not packing duplicate information in. I think you are 'overloading'
your information. As I said in my original message, if you have an
element of type Motive, that contains the word arson, I have no problem
with that. But in your example you are making the word arson play two
roles, one as the value of the Motive element, and the other as an
English word in a sentence. You must either:
- tell everyone to use the same words in their reports when describing
'motive', which means it is no longer free text and should not be
treated as such
- or, make a query for the motive 'arson', actually search for all words
in English that mean this, as well as German, French, etc., if you want
to use the same system internationally
I therefore suggested <Motive type="Arson">arson</Motive> as an
international and standard solution to this. I see no problems either
<Summary>A massive fire ravaged the building and 12 people were
killed. ... </Summary>
Either way, we can now find all documents about arson, without imposing
a certain style of writing or a certain language onto everyone who users
your system. The Summary could also now be in any language.
you do searches on the marked-up mixed content using the tags as ways
to do pinpoint searching, so the whitepaper illustrates how you can do
a search like:
WHERE CONTAINS('Fire WITHIN Cause') > 0
AND CONTAINS('Arson WITHIN Motive') > 0
as part of a larger SQL statement. This lets you find the needle in a
haystack in a data warehouse of insurance claims.
Sure, but as I said before you have lost the structure, and I would
guess - given the nature of SQL - you can only go to one level. By that
I mean you can only find 'Fire WITHIN Cause' inside a DamageReport. But
what if the damage report was inside a bigger year-end report? Could you
find all year-end reports that contain damage reports that relate to
fire? As I said, I think you need a layer on top of SQL. XSL, for
example, would have:
YearEnd\DamageReport\cause = "Fire"
We're working on even better support for native structural queries for
the future, but one approach people can adopt in the meantime is the
"persist the DOM tree to a table of nodes" approach that you've
pointed out with decent results. That works well for storage of highly
structured information, but not so great for searching mixed-text and
I agree. We're using a simple technique for now, which is to export
relevant sections of our database to HTML pages packed full of meta
tags, and then index them with a traditional index server. When we want
simple text we search the whole page, and when we want 'objects' we
search the meta tags. We never actually use the pages though, for
anything other than this indexing. When a user selects a search result,
we go back to the database and get the proper XML for whatever node was
requested. Obviously when index servers cope with XML we won't need to
Our Internet File System approach lets you more easily map things to a
table-column structure so existing tools can still work against the
data once it's in the database. Of course, it supports also
selectively maping documents and doc fragments to indexed character
blobs as well.
Fair enough. But although I understand you guys have to keep continuity
with the past for your existing customers, with respect, it is just SQL
with a few bits of tagging thrown in. I am not convinced that SQL can
take the strain of such a burden on its shoulders.
Intra Extra Digital Ltd.
39 Whitfield Street
t: 0171 681 4135
e: [log in to unmask]