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

RE: A standard approach to glueing together reusableXML fragme

  • To: <rjm@z...>,"Chiusano Joseph" <chiusano_joseph@b...>
  • Subject: RE: A standard approach to glueing together reusableXML fragments in prose?
  • From: "Dare Obasanjo" <dareo@m...>
  • Date: Wed, 20 Aug 2003 08:09:38 -0700
  • Cc: <xml-dev@l...>
  • Thread-index: AcNnKnGZglXj4+t2S7+jq41z7Nw/iwAAVY9k
  • Thread-topic: A standard approach to glueing together reusableXML fragments in prose?

glueing 2 x 4 together
I don't buy your argument. The main point of the relational model is relationships [and tuples]. Although hierarchy is one way to model relationships in XML it isn't the only way. XML 1.0 gives us ID and IDREF. W3C XML Schema gives us xs:key, xs:keyref and xs:unique. 
 
I'd suggest looking at the System.Data.DataSet class in the .NET Framework and seeing how it maps XML structures to relational data to gain an alternate perspective 
 
1.) http://msdn.microsoft.com/library/en-us/cpguide/html/cpconinferringdatasetrelationalstructurefromxml.asp 
 
2.) http://msdn.microsoft.com/library/en-us/cpguide/html/_generating_dataset_relational_structure_from_xsd.asp
 
(1) shows how one could map XML structures to relational tables without schema information while the (2) shows how one could approach this using data from a W3C XML Schema. 

________________________________

From: Rick Marshall [mailto:rjm@z...]
Sent: Wed 8/20/2003 7:46 AM
To: Chiusano Joseph
Cc: xml-dev@l...
Subject: Re:  A standard approach to glueing together reusableXML fragments in prose?



<oxymoron>relationally structured data</oxymoron>

of course you can represent records, but as soon as you make a tree out
of them they're not relational in a database sense

eg

<customer>
        <name>COMPANY X</name>
        <town>SOMEWHERE</town>
        <order>
                <part>ABC123</part>
                <quantity>2</quantity>
        </order>
        <order>
                <part>ABC234</part>
                <quantity>4</quantity>
        </order>
</customer>

just isn't going to be a relational form as there's no way to determine
a priori what the normalised records are. there's clearly 2 tables, and
you know that "customer" has attributes name and town, and "order" has
attributes part and quantity, but it also needs either name or town to
complete the relation and it's not obvious which. either or both?

so without some semantics you can't represent relational tables with the
natural tree structure of xml.

on the other hand

<customer>
        <name>COMPANY X</name>
        <town>SOMEWHERE</town>
</customer>

<order>
        <name>COMPANY X</name>
        <part>ABC123</part>
        <quantity>2</quantity>
</order>
<order>
        <name>COMPANY X</name>
        <part>ABC234</part>
        <quantity>4</quantity>
</order>

is ok, but then from what i've seen on the list most wouldn't think of
this single depth as the natural thing to do.

my personal preference (and used day to day) is:

<table name="customer">
        <record>
                <attribute name="name">COMPANY X</attribute>
                <attribute name="town">SOMEWHERE</attribute>
        </record>
</table>
<table name="order">
        <record>
                <attribute name="name">COMPANY X</attribute>
                <attribute name="part">ABC123</attribute>
                <attribute name="quantity">2</attribute>
        </record>
        <record>
                <attribute name="name">COMPANY X</attribute>
                <attribute name="part">ABC234</attribute>
                <attribute name="quantity">4</attribute>
        </record>
</table>

and a few minor attribute additions. but again i suspect this is not
what most use, but then i'm happy to proved wrong.

rick

On Wed, 2003-08-20 at 22:52, Chiusano Joseph wrote:
> <Quote>
> Unless someone can show me how XML or an XML only tool set such as
> TeraText supports and fulfills RM,
> </Quote>
>
> Are you asserting that one cannot represent relationally structured data
> using XML? If so, can you please elaborate?
>
> Kind Regards,
> Joe Chiusano
> Booz | Allen | Hamilton



-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>




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.