Re: What is the logic of storing XML in a Database?
Date: 28 Mar 2007 11:39:42 -0700
Message-ID: <1175107181.975254.157840_at_p77g2000hsh.googlegroups.com>
On Mar 27, 12:39 pm, "Daniel" <danielapar..._at_gmail.com> wrote:
> On Mar 27, 4:15 pm, "Marshall" <marshall.spi..._at_gmail.com> wrote:> On Mar 27, 11:45 am, Bob Badour <bbad..._at_pei.sympatico.ca> wrote:
>
> > > David Cressey wrote:
>
> > > > There are three things you can do with data: process it, store it, and
> > > > transport it. These three are all interrelated.
>
> > > That seems so limiting like having an emotional vocabulary of happy, sad
> > > and angry.
>
> > XML makes me sad and angry.
>
> Well, there are different aspects to XML.
>
> There really are people who think that XML databases are a good thing
> because they allow you to put data into storage without having to
> model the data, because "everybody" knows that modelling data is too
> hard. Of course, there's that little matter of getting data out
> again, but they have hopes that following conventions for positioning
> some key tags will lead to a good result. These are the same people
> who used to believe that storing name/value pairs in database tables
> was a good thing. I can understand that that would make you
> unhappy.
Exactly. I sometimes say:
Know schema, know semantics
No schema, no semantics
> There's also the niggling detail that the standard XML query language
> can return different results depending on whether or not it's a schema-
> aware implementation, and I can understand that that would make you
> unhappy.
>
> But why would you be unhappy about XML as a transport format? It's
> mostly an improvement over what we had before - CSV files, binary
> formats, etc.
Geeze, I'm tempted to flame, but you asked so reasonably, I'd be embarrassed if I did. (What is it about XML that drives so many to extremes, either pro or anti?)
To answer:
I'm an engineer, and I have deeply held engineer values. I value efficiency. I value simplicity. I value what Josh Bloch calls the "power-to-weight ratio" of a design: how much can you express vs. how much do you have to contend with to do it. Perhaps most of all, I value elegance, which is in part all of the above and in part an ineffable, aesthetic response.
XML embodies the opposite of all of these virtues.
Marshall
PS. I had a math teacher once who said that a proof was elegant if, when you read it, you wished you had thought of it. Received on Wed Mar 28 2007 - 20:39:42 CEST