A method for encoding hierarchical data stored in an index, partitioned
into blocks, over keys representing the data. For every key K
representing a record R in the index, the key of the children records of
record R are prefixed with K. The method includes traversing to a first R
record represented in the index, traversing from the record R to the next
sequential R such that the path in the index from the position
representing R to the position representing the next sequential R does
not include information relating to the children of R. Next, repeating
the latter operation for 0 or more R records, and for any 0 or more
particular R records, traversing from the particular R to its children.
The index constitutes a balanced structure of blocks.