A hierarchy may be explicitly or implicitly reflected in existing data maintained
external to hierarchy structures. Such hierarchies are referred to herein as a
"pre-existing hierarchies". Techniques are described herein for capturing a pre-existing
hierarchy in hierarchy structures. After a pre-existing hierarchy has been captured,
there exist two independent sets of data that reflect the hierarchy: the external
hierarchy definition and the internal hierarchy definition. Changing either hierarchy
definition changes the hierarchy. Therefore, to maintain a consistent reflection
of the hierarchy, the internal hierarchy definition must be modified in response
to changes made to the external hierarchy definition, and the external hierarchy
definition must be modified in response to changes made to the internal hierarchy
definition. Various techniques are described for maintaining consistency between
the two hierarchy definitions.