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

Summary

We can now work with hierarchical data that lives in normal relational tables. In this chapter, you learned how to use the new hierarchyid data type in SQL Server 2008 to cast a tree structure over data stored in everyday database tables, rows, and columns. The hierarchyid data type provides a set of methods and indexing strategies to enable efficient searching and manipulation of hierarchy nodes at the database level. This enables us to apply a hierarchical model to traditional table data rather than resorting to XML, in scenarios where it makes better sense to keep the data stored relationally than to refactor (revise) the data for XML storage.

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