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

Re: SQL DTD and related questions


dtd sql
I agree. Thanks
 
Marcio
----- Original Message -----
Sent: Monday, April 08, 2002 7:37 AM
Subject: Re: SQL DTD and related questions

Which type of transformation to use depends on the software you are
using.

The advantage of (1) is that you can write XSLT documents to transform
it to most SQL dialects and get a series of SQL statements that can be
executed directly. (If you write an XSLT generator that takes mapping
information and an XML document and does this, you might want to make it
available as Open Source. People ask for this fairly often, but I have
never seen it implemented.)

The advantage of (2) is that it the resulting XML document can be fed
directly to many different products that use an object-relational
mapping to transfer data from an XML document to the database. Note that
XSLT stylesheets that perform (2) will probably need to perform
structural transformations as well as value transformations. This is
because XML document structure is often different from database
structure.

-- Ron

> Márcio Fernando Keller wrote:
>
> Ex:
>
> (1)
> --------------------------------------------------------------------------------------------------------------
> XML
> <Cusmoter>
>     <FirstName>Marcio</FirstName>
>     <LastName>Keller</LastName>
>     <Sex>male</Sex>
> </Cusmoter>
>
> [XSLT document snipped]
>
> Result:
> </Statement>
> <Command name = "INSERT" />
>     <Tables>
>     <Table name = "Cust">
>         <Column name = "Name"> Marcio Keller </Column>
>         <Column name = "Sex"> 1 </Sex>
>     </Table>
>     </Tables>
> </Statement>
> (2)
> --------------------------------------------------------------------------------------------------------------
> XML
> <Cusmoter>
>     <FirstName>Marcio</FirstName>
>     <LastName>Keller</LastName>
>     <Sex>male</Sex>
> </Cusmoter>
>
> [XSLT document snipped]
>
> Result:
> <Cusmoter>
>     <Name>Marcio Keller</Name>
>     <Sex>1</Sex>
> </Cusmoter>
>
> =======================================================================================
>
> In the first option I can process the result xml almost directly to a
> database(no look at the mapping again)
> In the second option I can process the result xml and I need look the
> mapping again, if this record is for insert, update, ...

-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>

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.