XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
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] What is a sematic data model?

I agree with Michael that most typical software would define the data model and then specialise it for the XML or JSON. I’m not sure nowadays many would define the data model in UML. Domain Driven Design or equivalent architectural practices would in many cases be used to define it in code in a domain core layer. Then another layer, say, would specialise it to allow a serialisation of it to be valid according to the external (e.g. government-specified) constraints.

The specialisation, ready for serialisation, is where domain knowledge needs to be combined with either XML knowledge or JSON knowledge or both plus schema knowledge. Soon a generation of developers may arise who know not XML and XSD. Already there is question over governments requiring knowledge of Schematron, XPath, etcetera. It all reduces the pool of developers available to work on such software. 

On Fri, 12 Nov 2021 at 13:11, Michael Kay <mike@saxonica.com> wrote:
>
> Michael, what is a "semantic data model"?

A semantic data model tells you how the items in your data relate to things in the real world. An XML document might have a <product> element, but it doesn't tell you what a product is - and it's always more complicated than you think (for example, if you put your cornflakes in a Christmas-themed package one week, does that make it a different product?).

> Would you give an example of a semantic data model for XML and an example of a semantic data model for JSON, please?

You're putting the cart before the horse. You create a semantic data model for a problem domain (for example, in UML), and then you define XML or JSON representations of the data in that domain. The conceptual data model comes first, the concrete realisations come second.

Of course, people often skimp on data modelling and can get into a mess as a result. I did some modelling work with a TV company that couldn't agree what a "channel" was - some people thought it was a content service that people subscribed to, others that it was a set of electrical signals transmitted on a particular frequency.


> How are their semantic data models used to transform XML to JSON and vice versa?
>

You design an XML representation of the data model, and you design a JSON representation of the data model, and then you work out how they relate to each other, by referring back to the data model.

Michael Kay
Saxonica


_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php

--
----
Stephen D Green


[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