SQL Server 2008 supports a new data type, HierarchyID, that helps solve some of the problems in modeling and querying hier­archical information.

In the September 2008 issue of MSDN Magazine, Kent Tegels introduces you to the HierarchyID data type by presenting a bill-of-materials implementation in SQL Server 2005, then showing you how the HierarchyID data type can be used to implement the model in SQL Server 2008.

You can browse the sample code online, and check out the MSDN Magazine archives for more about SQL Server development and data access.