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

Re: Equivalence of hierarchical and flat data formats

  • From: Michael Kay <mike@saxonica.com>
  • To: Roger L Costello <costello@mitre.org>
  • Date: Thu, 28 Jul 2022 14:31:07 +0100

Re:  Equivalence of hierarchical and flat data formats

I don’t understand. The following flat data format uses primary/foreign keys to implement nesting:

In relational database normalization, a one-to-many relationship like book-has-author is usually represented by adding a primary key to the "one" end (book) and a foreign key to the "many" end (author). The problem then is how to represent the fact that there is a defined ordering to the authors of a book; and there's a variety of ways of handling this.

You've completely ignored normalization here - which is your prerogative, but it makes it meaningless to talk about primary and foreign keys.

Actually of course the book-has-author relationship is many-to-many, which creates another raft of issues.


Michael Kay
Saxonica


 
BookList.dat
Compilers Principles, Techniques, Tools               AUT01  Addison-Wesley               1986 
Introduction to Compiling Techniques               AUT02  McGraw-Hill      1996 
Economic Facts and Fallacies      AUT03               Basic Books        2011 
Economics in One Lesson             AUT04               Harper & Brothers           1946 

AuthorsList.dat
AUT01   Alfred V. Aho, Ravi Sethi, Jeffrey Ullman
AUT02   J. P. Bennett
AUT03   Thomas Sowell 
AUT04   Henry Hazlitt
 
Suppose I want to update the list of authors. Specifically, I want to add “John Doe” to the beginning of the AUT01 author list:
 
AUT01   John Doe, Alfred V. Aho, Ravi Sethi, Jeffrey Ullman
 
That update operation seems pretty straightforward to me. What is the issue that I’m not seeing?
 
/Roger



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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.