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

Re: XML to Database Inserts via XSLT

Subject: Re: XML to Database Inserts via XSLT
From: Barry Lay <blay@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 09 Mar 2005 16:21:42 -0500
xml insert database
Stef wrote:

Hello Everyone,
Well, the subject says it all really. I have
a few jobs that I -could- write perl to transform the
xml into inserts, however, I would prefer to use XSLT
and learn as I go. Another feather in my cap and all
that.


Stef,

I have done this with an Oracle database. The latter actually has a mechanism for directly updating the database from XML but we found it to be very slow. The process you show will work but if you are inserting a lot of rows then the round trips to the database will be a significant component of the run time. Oracle (and some others) provide mechanisms for inserting a lot of rows in one bulk operation, although they may not be available from an interactive SQL processor - you may need to create a program to do it.

The most efficient way to do this is probably to write your data out to a delimited text file and use the database load utility. This can result in order-of-magnitude-level improvements in load speed over separate INSERT statements This approach would require that your data rows have the same data elements and be loaded to the same table; I assumed from your example that this might be the case

Barry.

Current Thread

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
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.