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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   About SML data model and implication for RDBMS to SML mapping

[ Lists Home | Date Index | Thread Index ]
  • From: "Didier PH Martin" <martind@netfolder.com>
  • To: "'XML Dev'" <xml-dev@ic.ac.uk>
  • Date: Sun, 28 Nov 1999 14:44:24 -0500

Hi,

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:

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

Model 2:
--------

element
   |___ 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
model:

Model:
-----
	element
	   |___ 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
Ex:
  <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:
Ex:
	<client>
		<name>albert</name>
		<address>2345 Road Runner Road</address>
		<city>Los Alamos</city>
		<state>New Mexico</state>
		<country>USA</country>
	</client>

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.

Result:
-------
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.

Cheers
Didier PH Martin
mailto:martind@netfolder.com
http://www.netfolder.com


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@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@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)






 

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

Copyright 2001 XML.org. This site is hosted by OASIS