[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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

  • From: "Clark C. Evans" <clark.evans@m...>
  • To: Didier PH Martin <martind@n...>
  • Date: Sun, 28 Nov 1999 05:07:12 -0500 (EST)

road runner los alamos

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@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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.