Re: What is the logic of storing XML in a Database?




"Cimode" <cimode@xxxxxxxxxxx> wrote in message
news:1175179955.104759.220740@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Mar 29, 10:01 am, "David Cressey" <cresse...@xxxxxxxxxxx> wrote:
"JOG" <j...@xxxxxxxxxxxxx> wrote in message

news:1175112245.717262.275350@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

I'm sure there are many people who have been through the same
experience as myself using xml as a transport format:

1) Observe the popularity of XML and the supporting libraries in the
language you are working in.
2) Implement a transport layer using XML to parse messages/data etc.
3) Realise that your server/application is now over ten times slower
than it was before.
4) Remove XML and replace with something far simpler, far less verbose
and vitally far /quicker to parse/.
5) Curse XML for wasting your bloody time and never let it darken your
door again.

There are really two discussions going on in parallel in this thread.

One is about using XML for data transfer outside of a DBMS. I'm saying
"DBMS" rather than "Database" intentionally here. A DBMS can move data
across a network link, and even pass it to an inter-DBMS gateway.

The other, the one actually asked by the OP, is about declaring columns
of
type XML in tables.

I use CSV for data tranfer between one DBMS and another, when I don't
have
a workable gateway between the two DBMSes. It works just fine for me,
and
I see no reason to add the complexity of XML.

I see no reason to store XML database inside an SQL table. Perhaps if
you
wanted to keep an accurate record of the incriminating evidence.

Also, in your precis above, you implicitly refer to the "thundering
herd"
argument. I buy the thundering herd argument as a reason for
conforming, at
times. I don't buy it as the path to excellence. Excellent solutions
are
almost always beyond the reach of the thundering herd.

The trick is to figure out when good enough is good enough, and when
it's
not.
Agreed. But I am afraid that discussing the use of XML or CSV quickly
becomes a sterile debate. I did it in the purpose to trigger some
questions about XML.


Agreed. The first question you asked in this regard said it all: what
would you do with XML that you couldn't do just as easily with CSV? For
simple transport layer between two DBMSes, CSV suffices just fine. And,
for those who must use a text editor, it's text based!

(A little humor, here).

You've gotten lots of answers to that question, but all of those answers
beg the following question: why would you want to do those things outside
the context of a DBMS, if you could do them inside the context of a DBMS?








.



Relevant Pages

  • Re: What is the logic of storing XML in a Database?
    ... experience as myself using xml as a transport format: ... Implement a transport layer using XML to parse messages/data etc. ... I see no reason to store XML database inside an SQL table. ...
    (comp.databases.theory)
  • Re: What is the logic of storing XML in a Database?
    ... Implement a transport layer using XML to parse messages/data etc. ... would you do with XML that you couldn't do just as easily with CSV? ... real intent into triggering answers from XML proponents. ...
    (comp.databases.theory)
  • Re: What is the logic of storing XML in a Database?
    ... can't do with CSV. ... In what a header does constitute a schema. ... So a schema is the standard structure by which the user sending a file ... in much the same way that XML standards are. ...
    (comp.databases.theory)
  • Re: ultra newbie question (dont laugh)
    ... storing employee information in an XML file. ... but not as fun as writing the logic. ... On reason to use OOP is to insulate your main code from things like storage ... from CSV file. ...
    (comp.lang.python)
  • Re: What is the logic of storing XML in a Database?
    ... will trap most major errors. ... In fact one does, XML. ... CSV is useful for unloading an SQL table into a text ...
    (comp.databases.theory)