XML in Relational Database

Karstens Rage

Usenet Archive
Joined
Sep 29, 2006
Messages
2
Reaction score
0
Sorry if this is a issue that has been discussed before but I am not even sure how to search for something like this.

Say I have something that is very vague in terms of its definition. Like maybe a purchase order from a customer. Each customer defines its PO in terms of an XML schema or DTD which is specific but different for each customer. Also I don't know ahead of time all the customers' DTD's.

I also have my own specification for how I store customer ID's and dates and inventory, etc. and I want to put that into a relational database to allow for all the benefits therein.

So rather than try to force the arbitrary XML into some flexible database schema, is the standard practice to just store the XML along with the DB record as a BLOB? What are other options that people/service use?

In the front end and middle layer, XML is passed around but I eventually need to store stuff in the backend. I am concerned about having to constantly modify the database schema in the backend due to unforseen stuff that I have to account for in the front end. Also I don't want to have to try and design everything up front to account for anything that might come along.

Any comments or pointers to discussions that already address this greatly appreciated.

k
 

Joseph Kesselman

Usenet Archive
Joined
Feb 3, 2006
Messages
733
Reaction score
0
Karstens said:
So rather than try to force the arbitrary XML into some flexible database schema, is the standard practice to just store the XML along with the DB record as a BLOB? What are other options that people/service use?

If you can't or don't want to "shred" the XML into tables, your choices are a LOB with the XML syntax and/or preparsed tree... or to step outside the relational metaphor and do something based on XML's structure. IBM has supported the first several options for some time; as of DB2 they've added an XML-specific data model (the trademark for that feature is "pureXML") and extended the DB2 metaphors to operate upon it.

https://www.ibm.com/software/data/db2/xml/

Claimer (opposite of a disclaimer): I work for IBM, and I was involved in some of the early discussion of pureXML's design, so I'm biased toward it both professionally and personally.
 

Joe Kesselman

Usenet Archive
Joined
Feb 3, 2006
Messages
1,229
Reaction score
0
Joseph said:
structure. IBM has supported the first several options for some time; as of DB2 they've added an XML-specific data model (the trademark for that feature is "pureXML") and extended the DB2 metaphors to operate upon it.

Meant to say "As of DB2 version 9. Also known as DB2 9." (And there's a rumor, which IBM at least hasn't denied, that they seriously considered declaring that the new XML support was a big enough concept to justify calling this version DB3.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,049
Messages
3,104,245
Members
248,133
Latest member
DujonT

Latest Threads

Top