[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XML-enabled databases, XQuery APIs


clob to xml
Elliotte Harold wrote:

> Ken North wrote:
> 
>> When you store a document in a text column, it's searchable using SQL 
>> queries.
>> Those queries use the indexing capabilities of software such as Oracle
>> interMedia Text Cartridge, DB2 Text Extender and Microsoft Search 
>> service.
> 
> Yes, but suppose I want to find all occurrences of the string "Now is 
> the time for all good men to come to the aid of their country." XML 
> unaware full text search would not normally find "<strong>Now</strong> 
> is the time for all good men to come to the aid of their country."
> 
> More importantly, if I have XML data then I normally want to use the 
> markup to delimit and index the searches. For instance, I might want to 
> find all prescriptions of Xanax with a dosage of 5mg, not all 
> occurrences of the word "Xanax" somewhere near the text "5mg". If we're 
> just storing everything in a CLOB, we might as well be using flat files. 
> The markup has meaning. It should be used to inform and optimize the 
> queries.

Agreed.

The full-text search engines in some of the big databases (Oracle, DB2, 
not sure about SQL Server) have this capability to some extent. That is, 
they are XML aware in that they are able to recognize the difference 
between text and markup and that they are able to restrict text searches 
to a certain part of the markup.

This is probably sufficient for many applications, but insufficient for 
others. For example, DB2's Net Search Extender requires you to specify a 
document model (essentially an XML schema) when setting up the index for 
a CLOB column. This would make it impossible to store documents 
conforming to multiple different versions of the same schema in that 
column, since different models would be required for each schema version.

CLOB storage has other problems as well, which is why I highlighted it 
in my comments to Edd. For example, you can't do node-level updates. Not 
a problem when updating a 10K document, but definitely a problem when 
you want to change the value of a single node in a 100MB document and 
you have to reinsert, reparse, and reindex it. And CLOB storage 
generally doesn't support XPath or XQuery. (Actually, Oracle's XML CLOB 
storage does support XPath, but good luck if the XPath expression can't 
be evaluated against the indexes.)

So while such storage is adequate for some applications, it's inadequate 
for other applications. Which is why the big relational databases have 
added / are adding native XML storage.

-- Ron


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.