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

IDs considered harmful or why keys might be better than IDs...

  • To: xml-dev@l...
  • Subject: IDs considered harmful or why keys might be better than IDs...
  • From: Eric van der Vlist <vdv@d...>
  • Date: Mon, 12 Nov 2001 10:42:41 +0100
  • User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011023

IDs considered harmful or why keys might be better than IDs...
Hi,

I have mixed feelings about this long discussion about XML IDs.

On one hand, the concept of ID seems to be very useful and we obviously 
need unique IDs to avoid ambiguity.

OTH, can an ID for application X be exactly the same than an ID for 
application Y? Can we be sure that their needs will be close enough to 
guarantee that they will refer to the same "object" with the same scope?

In real world, giving unique IDs to concepts which seem as universal as 
a "company" has proven to be quite a challenge. Why would it be 
different if the "company" is enclosed in a XML document?

RDBMs have been able to break through because in a sense, they've thrown 
IDs away... Or should I say, they've allowed (or imposed) to every query 
to specify the "IDs" to use in its where clause.

That's a big constraint for SQL: there is no equivalent to foo.xml#bar 
for SQL and you need to know the name of the column to use as the ID (if 
there is one) and write "select * from foo where myid=bar" but that's 
also a major strength.

To deal with the compexity and with the performance issues, RDBMS have 
invented indexes which are "out of band information" and XSLT has 
already dealt with this issue through keys:

http://www.w3.org/TR/xslt#key

A way to deal with this issue would be to find a way to associate both 
concepts and be able to express that you want foo.xml#bar using a 
specific key definition.

A default key definition could be provided within the document or linked 
from the document, but you could also find a way to specify your own key 
during the query.

My 0,02 Euros,

Eric
-- 
Rendez-vous à Paris pour le Forum XML.
                    http://www.technoforum.fr/Pages/forumXML01/index.html
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
http://xsltunit.org      http://4xt.org           http://examplotron.org
------------------------------------------------------------------------


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.