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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: About SML data model and implication for RDBMS to SML mapping

[ Lists Home | Date Index | Thread Index ]
  • From: "Clark C. Evans" <clark.evans@manhattanproject.com>
  • To: Didier PH Martin <martind@netfolder.com>
  • Date: Sun, 28 Nov 1999 05:07:12 -0500 (EST)


SML without attributes --> SML requires namespaces.

On Sun, 28 Nov 1999, Didier PH Martin wrote:
> 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>

Which one you use really depends on the context -- what is
data and what is meta-data.   If I am writing a letter
to a client, I would use the former.  If the XML is a
"new client" form, then you use the latter.

If you are doing a XML <-> RDBMS sync, I use something 
completely different:

  <client modified-date="28-NOV-1999" id="2283834" >
    <name>albert</name>
    <address>2345 Road Runner Road</address>
    <city id="LAL">Los Alamos</city>
    <state id="NM">New Mexico</state>
    <country>USA</country>  
  </client>

Where attribues are used to encode information
specific to my database (i.e. primary keys and
modification dates, etc).

Here the content is the data, what a person
may have filled out in a new client HTML form,
and the attributes are meta-data, the information
which my information system needs for bookkeeping.

...

Thus, it may be smart to eliminate attributes,
as Didier's e-mail provides good detail, however,
there must be a way to seperate the meta-data
from the data.

I suggest that namespace support may do it:

  namespace mcdi == my company's database info
  namespace ctml == client information protocol

  <ctml:client>
    <mcdi:modified-date>28-NOV-1999</mcdi:modified-date>
    <mcdi:id>2283834</mcdi:id>
    <ctml:name>albert</ctml:name>
    <ctml:address>2345 Road Runner Road</ctml:address>
    <ctml:city>Los Alamos<mcdi:id>LAL</mcdi:id></ctml:city>
    <ctml:state>New Mexico<mcdi:id>NM</mcdi:id></ctml:state>
    <ctml:country>USA</ctml:country>
  </ctml:client>                                                         

Actually... I like this... it is quite a bit more clear,
and it allows for recursion inside the meta-data when
needed.  Nice.

Thoughts?

Clark




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