XML overuse? (was Re: Python to XML to Python conversion)

Alex Martelli aleax at aleax.it
Fri Jul 12 10:03:28 EDT 2002


Cameron Laird wrote:

> I know just what'll help you feel better, Alex--thoughts
> of the RDBMS vendors advertising that their datastores
> have magically become the best places in the world to
> keep all your tree-structured data.
> 
> The part that might shock you is that I agree with them
> occasionally.

A well-implemented RDBMS is an excellent place in which to
keep data with whatever structure -- you just have to ensure
you represent that structure as a normalized relational form,
to get all the benefits.  E.g., each parent <-> children relation
in a tree is a 2-column table of (parentid, childid), for example.

I have nothing against building "richer" structure automatically
on top of relational power -- indeed, that's a good part of
what AB Strakt's application framework is all about.  But I've
always been wary of using specific RDBMSs' datamodel extensions
(such as, e.g., PosgreSQL's "inheritance", tempting though it
may be) -- and so far I've managed to prosper without ever tying 
any production system to any of them.  Maybe if I'd ever had to
do serious, 'production' OLAP, e.g., I'd feel differently.  But
I doubt XML's existence is going to change things all that much.

The ability to export some query's results as XML -- and import
such XML back to do inserts/updates -- sounds like a perfectly
reasonable utility to have for a RDBMS, just like long-standing
similar abilities for CSV and other textual file formats.  Again,
such extras need not alter the RDBMS's relational abilities -- I
most definitely hope they don't!

Somebody else commented that "XML databases" are a good idea
because some programmers are bad at designing relational schemas.
<shudder>.  Now THAT is an idea that sends shivers down my spine.
Maybe I'm just too pessimistic, but I'd really like to look at
the relational schemas autogenerated from DTD's or whatever --
and if the underlying relational stuff isn't there, or isn't at 
all accessible, then please include me out of such plans.

Maybe I _am_ getting better understanding of where the anti-XML
rage comes from.  A few years of such prospects, and I might
start on an anti-XML crusade too, if I don't watch myself...:-).


Alex




More information about the Python-list mailing list