[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] About SML data model and implication for RDBMS to SML mapping
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@n... http://www.netfolder.com xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1 To unsubscribe, mailto:majordomo@i... the following message; unsubscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|