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

From: Marshall <marshall.spight_at_gmail.com>
Date: 29 Mar 2007 08:58:35 -0700
Message-ID: <1175183915.525024.58820_at_n59g2000hsh.googlegroups.com>


On Mar 29, 7:25 am, "Daniel" <danielapar..._at_gmail.com> wrote:
> On Mar 29, 10:37 am, "Marshall" <marshall.spi..._at_gmail.com> wrote:
>
> > On Mar 28, 11:23 pm, Bernard Peek <b..._at_alpha.shrdlu.com> wrote:
>
> > > Can I turn this around and ask you what you think XML would look
> > > like if it was more elegant?
>
> > Binary.
>
> This is going against the tide, you may think the tide is going the
> wrong way, but the overwelming movement is to character encoded
> formats. There are reasons for that that are well known. The
> experience with CORBA is instructive.

I have heard all the arguments for text formats, and they are all completely without merit. I observe that http transfers more binary files with fewer problems than it does html files. Consider jpeg, a *complicated* binary file format which requires a math-intensive discrete cosine transform decompressor that very few people could implement correctly to work. And yet somehow there is no problem.

Another protocol that doesn't seem to have a problem with binary: TCP.

And I dispute the word "overwhelming." It is overwhelming the same way the world is moving overwhelmingly to ruby. That is to say, it isn't, but there is a lot of wishful thinking going on from a tiny but very vocal minority.

Text formats are appealing to dilettantes because they are easy to get off the ground. Hard problems seem to disappear because we simply fail to address them.

I am reminded of the familiar quote:

  "For every complex problem there is an answer   that is clear, simple, and wrong." -- Menken

Oh, and you mentioned CORBA. It failed because it was wildly complicated, not because it used binary transport. Gratuitous complexity will be what fells XML as well.

> > Simpler: no distinction between entities and attributes, for example.
>
> I think you mean elements, not entities. Some XML people
> agree with you.

Fair enough.

> > It would have a type system.
>
> XML Schema does describe a type system for XML documents.

The question was what would make something that does the job of XML more elegant. I forgot to mention that it should be self-contained. The existence of teeming schools of add-on standards are a symptom of the inadequacy of the original standard, not anything like a strength.

XML has no type system. That a variety of other people have made up add-on type systems doesn't change the fact that XML has no type system.

> > It would have *one* way of representing schema
>
> The W3C XML Schema is becoming the more or less
> the universal schema for XML documents.

I believe that it is getting traction. However, I have only ever met one guy who uses it, and his attitude was that it was awful but it was also popular so what can you do? Not a ringing endorsement.

> > Schema would be embedded
>
> A reference to a schema can be embedded in an XML document.

I just don't see this as good enough.

> > Relational support
>
> Why? It's a different concern.

Relations are data the same way that trees are data. The difference is that trees are a limited data format that cannot model certain fundamental structures, such as many-to-many relationships. Relations are a necessary and sufficient data structure; trees are an overused underpowered substitute.

Marshall Received on Thu Mar 29 2007 - 17:58:35 CEST

Original text of this message