Computational Hierarchies - example scripts

The following two scripts illustrate the use of topologically ordered hierarchies to rollup account details. At each level, there is an indicator that determines the sign of the rollup to the next level. A view is defined that simple links any ancestor-descendent pair in the account hiearchy and determines if the descendent needs to be negated or not.

The first file is the DDL and it also loads some data.

The second file progressively demonstrates how the method works.

VDM Access: