O'Reilly logo

Programming Microsoft® SQL Server™ 2008 by Leonard Lobel, Andrew Brust, and Stephen Forte

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Hierarchical Data and the Relational Database

Leonard Lobel

Hierarchical data is not relational. It is organized as a tree structure of parent and child elements rather than as flat lists of rows in related tables. The most common hierarchical data format in today’s world is XML, and in Chapter 6, we covered the rich XML support that Microsoft SQL Server provides. There’s no doubt that XML is the right database storage choice for hierarchical data in many scenarios. It can be particularly useful when that data is consumed in XML format by client applications or in circumstances where you need to store and retrieve the entire hierarchy at a single time.

But XML is the wrong choice when you’d prefer to keep your data stored relationally ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required