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

Re: Primary and Foreign Keys

  • From: Ronald Bourret <rpbourret@r...>
  • To: xml-dev <xml-dev@l...>
  • Date: Tue, 24 Jul 2001 23:03:45 -0700

primary and foreign keys
Sorry about the late reply -- I'm just catching up.

You've missed two options:

5) Nesting. The results from one table are nested inside the results
from another table. Although Thomas pointed out that the dependent table
is usually the child, there is no requirement that this be true. The one
real-world example I've encountered is a sales order for a book, where
the complete part (book) record is a child element. This makes sense,
since it is common to order books that are not stocked in a bookstore
and therefore not already in the database.

6) Leave the key value out of the XML document. This requires that
nesting is used to indicate key relationships and makes sense when: (a)
key values are generated by the database, and (b) the data is being
transferred to a different database. Such values not guaranteed to be
unique in the second database.

Otherwise, I pretty much agree with Thomas.

-- Ron

"Bullard, Claude L (Len)" wrote:
> 
> A more fun question:
> 
> Given a relational database for which one creates a
> parallel XML schema, how do others think key relationships
> should be described:
> 
> 1.  Simple types with the insurance that corresponding
> values exist in both tables (doesn't seem very strong to me).
> 
> 2.  Key/keyrefs
> 
> 3.  ID/IDREFs (probably a non-starter given the caveat)
> 
> 4.  XLinks
> 
> Caveat:  It is usually the case that the schema will be broken
> up into multiple schema given that the original is
> for a very large (field and table wise) relational
> system. Also note, this is going from relational to
> XML Schema, not the other way around.
> 
> Len
> http://www.mp3.com/LenBullard
> 
> Ekam sat.h, Vipraah bahudhaa vadanti.
> Daamyata. Datta. Dayadhvam.h
> 
> ------------------------------------------------------------------
> 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 unsubscribe from this elist send a message with the single word
> "unsubscribe" in the body to: xml-dev-request@l...

-- 
Ronald Bourret
Programming, Writing, and Training
XML, Databases, and Schemas
http://www.rpbourret.com

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.