OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Before creating a syntax, create an underlying datamodel


I don't think your understanding of "data model" is wrong; it *is* in many ways a way of viewing the world.  (In a different thread, the mention of an application needing to know whether an attribute value was or was not defaulted identifies a specific way of viewing the world.)

The exact same set of instance data can be described by many, many "data models".  The trick is using a data model that (a) describes the world in the way required by the environment and (b) has sufficient support for tools (e.g., languages, processors, etc.) so one doesn't have to invent everything from scratch.

The XML Query WG and XSLT WG did not invent XDM because the Infoset or PSVI were "too general", but because they did not capture all of the information that was required by a query processor or a transformation processor.

I want to emphasize that there is not, and cannot exist, any single "universal data model".  And that is true for many, many reasons.  The most basic data model for XML is a directed, acyclic, hierarchical graph (that is, a tree) of nodes.  The most basic data model for SQL is a multiset of rows of columns of data values.  (Note: SQL's data model is NOT the same as the relational model of data, although it is very closely related.)

For many reasons, XML data models typically separate the schemata from the data.  That is why Ghislain's discussion of "validation" is so important.  If you happen to stumble across a free-floating bit of XML in the wild, you must "validate" it against a specific data model in order to whether or not the XML is, in fact, an instance of that data model.  SQL's approach is very different -- the data cannot even exist without the schema that describes it. (NB: This is not true of the relational model!)  There is no need to validate SQL data against a schema because the very existence of the data is proof that it is valid data.

Hope this helps,

On 4/18/2016 5:32 AM, Costello, Roger L. wrote:

Roger Costello wrote:


An XML Schema defines a new syntax
                so before you create an XML Schema,
                create a data model.


Ghislain Fourny responded:


Validation is done on top of the data
               model (the PSVI being XML Schema's
               data model). I don't think one needs to
               reinvent a new data model for every
               new schema.


On the other hand, schemas that leverage
               the XML syntax to serve a completely
               different data model (RDF/XML, XBRL,
               "flat XML").


Thanks for the feedback Ghislain!


I probably have an incorrect understanding of what a “data model” is. I think of a data model as a way of viewing the world. For example, the XSLT and XQuery folks view the world as a bunch of “sequences”. For example, “this element consists of a sequence of items.” That model is different from other models such as the Infoset model or the PSVI model. But the “sequences” concept is very useful to the XSLT and XQuery folks. The XSLT and XQuery folks could have used an existing model, such as the Infoset model, but they chose not to. I suspect that they devised a new data model (XDM) because existing ones (such as the Infoset) are too general; they needed something more specific.


Similarly, when I begin work on some data, I want all the users of the data to have a specific, agreed-to view of the data. I could use an existing data model such as Infoset or PSVI, but they are typically too general. That’s why I think it would be good to create a data model prior to creating any XML Schema. What do you think?




Jim Melton --- Editor of ISO/IEC 9075-* (SQL)     Phone: +1.801.942.0144
  Chair, ISO/IEC JTC1/SC32 and W3C XML Query WG    Fax : +1.801.942.3345
Oracle Corporation        Oracle Email: jim dot melton at oracle dot com
1930 Viscounti Drive      Alternate email: jim dot melton at acm dot org
Sandy, UT 84093-1063 USA  Personal email: SheltieJim at xmission dot com
=  Facts are facts.   But any opinions expressed are the opinions      =
=  only of myself and may or may not reflect the opinions of anybody   =
=  else with whom I may or may not have discussed the issues at hand.  =

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS