Monday, May 2, 2011

What's a hierarchyid?

While studying for the MCTIP SQL 2008 Developer exam, I ran across a data type I'd never seen before (and I'm sure I'll discover more in my career):  the hierarchyid.  References in Technet and an informative blog by Simon Ince.

This CLR based data type is designed to provide a simple way to represent hierarchical data - a bill of materials or empoyee org chart are examples. 

It is interesting that recursive Common Table Expressions were emphasized in the MCTS SQL Developer exam, and hierarchyid data type replaces this construct with something much easier ot use.

No comments:

Post a Comment