Re: XML Data Model

From: Tom Hester <thester_at_metadata.com>
Date: Wed, 08 Dec 2004 10:06:49 -0800
Message-ID: <bcdb2$41b74228$45033832$3926_at_msgid.meganewsservers.com>


Dawn M. Wolthuis wrote:
> If you look at http://www.w3.org/XML/Datamodel.html you see a description,
> but not, perhaps, a complete "data model" as a relational theorist would
> describe one. In other words, if this is placed side by side with a
> "relational data model" we might not call both of them "data models".
>
> So, what does constitute a data model? That is, if there were a complete
> "XML data model", what would it need to have to convince the relational data
> model theorists that it is, indeed, another data model?
>
> --dawn
>
>

Okay, I'll bite. My memory from a misspent youth studying philosophy is that a model is an abstraction of something real (something in the real world). The purpose of the abstraction is simplicity of manipulation. That is, because the model is somehow simpler than the real thing; it is simpler to manipulate. Now there are lots of ways to create models, ranging from carving balsa wood to model theory. A model in model theory is a set-theoretic interpretation of a language. In the case of the relational model, it is sets of data values that describe some aspect of the real world. Now obviously there is some distance from a model theoretic model of the real world to that balsa model I tried to build in adolescence.

Relational folks are enamored of models that have the theoretical underpinnings of a model-theoretic model, and I share their love of such models. I think the essential problem with XML is that it is not a language that describes something from the real world. That is, if it had a formal model; that model would not be an abstraction of anything in the real world. It would not be a set theoretic model either. Rather, it would be a model of a document--itself an abstraction. The XML language such as it is describes a serialization of a tree of nodes.   Those nodes may or may not have correspond to something in the real world.

In model theoretic terms the correspondence between the elements of the sets in the model and things in the real world is called a substitution function. For the relational model that function is equality. That is a tuple in an employee relation describes the person about whom the fact in the relation is true: has an employee number of 13, red hair, blue eyes, makes $800 monthly, etc. I cannot imagine what such a function would be for XML. Once again, the nodes that exist in an XML model may be abstract or they may be snippets of text that do not describe anything in the real world.

But, it seems to me that all of this is beside the point. XML is an interface language, not a data language. There is no data model for XML because it does not describe data (facts about the real world). Rather it describes how to pass text between processes. Received on Wed Dec 08 2004 - 19:06:49 CET

Original text of this message