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

Re: Shredding XML

  • From: "David A. Lee" <dlee@calldei.com>
  • To: Liam Quin <liam@w3.org>
  • Date: Thu, 29 Oct 2009 21:20:32 -0400

Re:  Shredding XML

20091030002408.GW5522@w3.org" type="cite">
--> Liam Says ... 
Yes, this is what I recommended in a book on the subject, years ago,
and is what generally works the best.

  
2) Put XML in "Blob" fields
--> solves the "letter of the law" -- yea its in "A Relational Database"  
but its useless
    

If the purpose (as so often) of the relational database is warm fuzzies,
it's far from useless.  Plus it'll use massively more disk storage! :-)

  

I was only slightly serious when I said it was "useless".  I have implemented quite functional and useful systems using this approach (storing xml as a blob field).
It works and performs extremely well ... as long as you don't try to use the blob field in an SQL Query ...
Rather, load the field as a blob into the application memory and perform your XML operations there.   I have found that this can perform 100's (or more) of times more efficiently then performing similar operations on the server using relational data ... providing you have enough memory and the processing is localized.
In one example, I had an xml schema with about 50 distinct elements.   We did an experiment of shredding this into relational data, which turned into about 80 tables.  Performing joins across 80 tables was dismal, even when done as a stored procedure (in an enterprise DB no less).
However the analogous operation of loading the entire "blob" into memory on the client, then parsing it as XML then using java XML operations on the data (and in this case we were writing it back out)  performed vastly (100x+) better and was much simpler to code.   I do recommend this approach if your xml data is localized, and can fit into memory, and doesn't need to be deeply queried from SQL.  You do gain some advantages of a relational DB - namely the consistency of storage, backups and data management.
And you can tell everyone "Its in the database" ... (then duck).


-David lee
dlee@calldei.com
http://www.xmlsh.org



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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.