Hi Hans,
Using XML Schema for data modeling is an excellent idea for these reasons:
-
You don’t have to normalize.
-
Trees are more like the real world structures than rows and columns.
-
It’s an standard representation, universally accepted
-
You can find many tools to represent it visually and generate nice documentation on HTML and other presentation formats.
-
Could be used as the basis for Model Driven Development in combination with XRX. Just imagine generating XForms automatically from Schemas
and using an XML database to store the data as XML Instances. Many people is saving lot of work using this approach (including me).
-
And finally, it’s XML! You can manipulate it using the XML ecosystem of tools and technologies.
Off course, there are some disadvantages:
-
XML Schema is not so good representing relationships, but is flexible to allow you to design a mechanism for representing them
-
Some concepts are complex to represent, like inheritance, but you can find some helpful XML Schema patterns on the web.
-
One of the most useful features, assertions, is new on XML Schema 1.1 and the vast majority of tools only support XSD 1.0.
In infer from you question that your need is related to business systems and XML Schema fits very well on these, even best than ER model. The best
examples you could find are ecommerce standards, like UBL and HL7. Those are based on XML Schemas for modeling both messages and entities, and solved the problem of representing relations dividing the models in two layers core concepts and messages:
All the ‘static’ entities on the core concepts layer are represented as XML elements, with ID attributes, and in the messages layer, these ID’s
are used as references, but is allowed to include a full copy of the core concept elements in the message, not only the ID (to avoid normalization).
Maybe UBL is not very successful, but it’s due to the human resistance to standardization, but is an excellent example of a data model made with
XSD.
Hope you find these ideas useful,
-
Bill
De: Hans-Juergen Rennau [mailto:hrennau@yahoo.de]
Enviado el: lunes, 30 de septiembre de 2013 3:27
Para: xml-dev@lists.xml.org
Asunto: XML Schema as a data modeling tool
I am interested in approaches to use XML Schema as a technology for constructing data models, which have a scope exceeding the definition of exchange messages (e.g. web service
design). One idea may be to use XML Schema for the construction of a "reference model" to which message structures can be related, and I think this is a basic goal of NIEM. Another idea may be to use XML Schema for creating a conceptual data model to which
relational database schemas may be related, offering unambiguous points of reference to which semantics and metadata may be connected. So I wonder, is XML Schema also used for enterprise-scale data modelling?
Much promise seems to be implied by the fact that XML Schema describes tree structures, is firmly based on an elaborate information model (Infoset/XDM) and is clearly related to
URIs - which makes it a candidate resource for generating various other resources from it with immaculate reliability.
So I would like to learn about approaches of using XML Schema for data modeling purposes - goals, benefits, limitations, case studies, etc. etc. If anybody has any links, information
or thoughts, it would be appreciated.