Chapter 12 –- Using XML to transport relational data

This chapter of SQL Server MVP Deep Dives starts with a discussion about quite a few parts of the business processes used while dealing with data. Beginning with an interview with the principal in the business (in this case “self-claimed recording industry expert Joe “Mix-Remix” Quickfinger”), we quickly determine from talking with Joe that the recording business centers around the idea of discography, which is in turn made up of albums of tracks performed by bands made up of people. This gives us a complete logical model, from which is made a relational data model, which gives a structure to build a database around.

The author, Matija Lah (blog), then goes on to define XML schemas that encompasses that database, for making the data portable. He takes the opportunity of schema building to discuss how the utilization of multiple schemas within the XML allows normalization within the XML itself, in this case separating Album from Band schemas to allow each to have their own Person entities. I found the use of downloadable pre-built schemas containing data from well-known bands helpful in visualizing differences between normalized and non-normalized data very effective.

The concepts encourage the use of a database as “permanent” storage, and XML as “temporary” storage used to move data. Once the author explains the database and XML schemas and puts them in place, he then goes on to define the data flows; in other words, getting the data moved between the persisted database and the portable XML using XPath expressions within T-SQL statements inside stored procedures (all scripts for the entire exercise are available from Manning’s website), and perhaps more importantly, in what order. The order matters because the relationships defined in the database are maintained in the XML by nesting the related elements within each other.

Throughout the chapter, there are sidebars that define key concepts, and, where the explanation of a concept is warranted but outside the scope of the chapter, the reader is directed to appropriate resources, such as Books Online and the w3.org website, in the case of XML namespaces. The chapter ends with some homework assignments to further use and manipulate the data to gain a greater understanding of the use of XML as a means of transporting relational data.

My name is David Taylor, and I am a MCTS in SQL Server 2008. I blog at dyfhid.wordpress.com, and am fairly active on Twitter as dyfhid.


0 Responses to “Chapter 12 –- Using XML to transport relational data”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 11 other followers