About SML data model and implication for RDBMS to SML mapping

Clark C. Evans clark.evans at manhattanproject.com
Sun Nov 28 22:06:43 GMT 1999

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" >
    <address>2345 Road Runner Road</address>
    <city id="LAL">Los Alamos</city>
    <state id="NM">New Mexico</state>

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

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



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