• For the sake of completeness, I'd mention another method to store hierarchies in the database - the path model which is similiar to the adjancey model, in that each node in the hierarchy contains information on its ancestor. However, in the path model, each node contains information on all its ancestors up to the root.

    HierarchyID in SQL Server 2008 does exactly that, and has a very rich set of functions to query and manipulate the data.

    Books Online article on HierarchyID here: http://technet.microsoft.com/en-us/library/bb677290.aspx