[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Primary and Foreign Keys
"Bullard, Claude L (Len)" wrote: > > Umm, I can't seem to get my thinking past the need to > be able to say (since I am reverse engineering > backwards from the relational model) that > the value for this is over there. It is almost > as if one needs to denormalize but that seems > wasteful. That is why links look attractive. But denormalizing is a lot of the point of XML (and certainly one of the selling points of native XML databases). The whole idea is to put all the related data in one document. How far to denormalize is an interesting question. If you keep the data entirely normalized and in separate documents, you have just created an incredibly inefficient relational database. If the data exists as XML only between the database and an application, then denormalize all you want. That's a selling point for XML -- you get all the data in one place when and where you need it, rather than cobbling it together from various result sets or piecing it out of a non-normal result set created by joining multiple tables. If the data exists as XML only to transfer it between databases, then you need to be sure your data transfer software handles duplicate records correctly, which is non-trivial. For example, if the same part info is contained in two different sales orders, what does the software do when it tries to insert the second part record? This argues toward limited denormalization, such as putting sales order header and line item info in one document, but linking to part info in another document. -- Ron
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|