About SML data model and implication for RDBMS to SML mapping

Didier PH Martin martind at netfolder.com
Sun Nov 28 20:38:04 GMT 1999


So, if I understand well, by removing attributes from elements we are also
changing the data model (I do not say that it is right or wrong, just try to
see the implications).

In XML, if attributes are added to elements we have the following data

Model 1:
   |___ properties collection
   |          |___ attribute 1
   |		  |___ attribute 2
   |___ Data content
   |___ element

Model 2:

   |___ attribute 1
   |___ attribute 2
   |___ Data content
   |___ element

The difference between model 1 and 2 is that in model 2 the data content and
the attributes are in fact all assembled into a single "property set" (note:
there is no relation here between the set of properties we are talking here
and SGML property sets). some properties could be single valued of multipled
valued (i.e be a collection - candidate for this: idefs, element). In model
1, we separate the data content from the attribute collection. We added more
elements to re-enforce the collection concept.

In SML, if we remove the attributes from the elements then we have a single

	   |___ element
	   |___ element
			|___ element

Any designed style sheet engine is therefore dependent on a data model and
if we design a XPath kind of addressing schema, then the choice of the data
model is important.

Relational data base to SML mapping:

In the XML world, There is two school of tought here:
a) a record is mapped an attribute set
  <client name="albert"
	    address="2345 Road Runner Road"
	    City="Los Alamos"
	    State="New Mexico"
	    country="USA"/ >

b) a record is mapped into a hierarchy of elements:
		<address>2345 Road Runner Road</address>
		<city>Los Alamos</city>
		<state>New Mexico</state>

Advantage for a Query language to get a structure node:
Simple, all contexts of a string based query path would be elements only -
This could reduce the number of entities or number of possible combinaison
for a particular path context.
Also, because in XML there is two possibilities, some prefer would use the
first kind of mapping for RDBMS to XML mapping (i.e. use attributes to map
the records content) and others would prefer the second one (i.e. use only
elements to map the records content) . This, in fact, leads to the
situration that, even if the data is serialized into a single format, it is,
in fact, encoded into two different data models. The advantage to remove
properties is that we have a single model.

I do not know yet for knowledge encoding type of documents, but for data
encoding and more particularly for RDBMS to SML mapping, we gain, at least
that data would be encoded into a single data model. In XML RDBMS to XML
mapping may be done potentialy with two different data model. This last fact
increases costs.

Didier PH Martin
mailto:martind at netfolder.com

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)

More information about the Xml-dev mailing list