DW
Help for Hierarchies – Dimensional Modelling
here is a good article by Ralph Kimball on managing ragged/variable-depth hierarchies in a data warehouse
http://www.dbmsmag.com/9809d05.html
And here is the design tip that follows on from the above article