Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Development Trends in Web and Oracle

Re: Development Trends in Web and Oracle

From: Galen Boyer <galenboyer_at_hotpop.com>
Date: 13 Mar 2005 19:41:03 -0600
Message-ID: <u1xaihl1p.fsf@hotpop.com>


On Sat, 12 Mar 2005, andy_at_andyh.co.uk wrote:

> On Sat, 12 Mar 2005 21:21:03 -0000, "Hexathioorthooxalate"

> If you've got an XML Schema isn't it possible to automatically derive
> a relational schema that can store the XML? (Or at least, one
> possible relational schema - there are likely various ways to
> represent an XML Schema in relational form, but given consistent
> rules it should be possible to deterministically come up with the
> same relational schema for a given XML Schema?). If you're already
> inside a relational database, and it's mapping XML into a relational
> schema, then you could have the option of issuing an XPath query
> which the server translates internally to SQL against the data; or
> you could just use SQL against the relational schema itself.

I believe I'm with Hexathioorthooxalate on this point. What's the reason to take the xml data and get it to a relational form, if the only use for the data is to pass it back to the application in xml form? At this point, I would use the database as an efficient storage and retrieval mechanism. The question is, would I spend boatloads of cash on Oracle for this purpose? No. But I don't believe Hexathioorthooxalate is proposing that one do that. I'm sure that there is enterprise level data stored relationally where he is also storing XML. I believe the two arguments in this thread are coming from two different assumptions of from when the "XML in the database" has been architected. I most certainly wouldn't "design" a data-store by implementing it in XML storage. But, if I walk into a shop and they have a large enterprise application that talks XML and they are trying to capture different phases of the application's conversations, I would most certainly consider storing the xml passed to the database as XML. If the data being passed had enterprise level value, then, of course I would move to relational.

Here is an example of what I'm talking about. Suppose I was designing a database store for an app, and part of that app was to capture emails being sent. Would I care to relationally model all the pieces to an email (Subject, From, To, Body, References, ...), rip apart the email passed to me, store it relationally, and then, when someone requests a certain email, recreate the clob that was passed to me? No. I would rather just store the clob. But, if the sole purpose of the application was email, then, I would relationally model an email and store all pieces in the proper relational form. Now, the email being passed to me very easily could have been in XML with the Subject, From ... all being XML tags modeled nicely with actual RI in the email snippets. But, I probably wouldn't see any value at capturing the attibutes in a relational store. A perfect example of how XML can augment relational. Not all RI must be in a relational database for it to be valid. Many times, it doesn't really make sense from an enterprise standpoint to try and remodel the XML in a relational form because the data doesn't have enterprise level value. A PL/SQL developer doesn't model storage of the parameters sent to his package, but he certainly models the data that those parameters are used to restrict on. Many times, with xml, the data being passed is akin to the parameters being passed to packages. No real enterprise level value for capturing them in a relational store, but there still might be some value at just taking them and putting them in an array, storing that array in a table and then having a record of all the parameters having been passed to packages.

That being said, Hexathioorthooxalate has seemingly stated that XML is a new-wave, better form of storage than relational, and for this, he does deserve to get appropriately beaten up, as he has.

-- 
Galen deForest Boyer
Received on Sun Mar 13 2005 - 19:41:03 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US