Dave Higgins Consulting Strategic Technology Consulting and Enterprise Architecture |
Home | What's New | What's Old | Articles | Associates | Interesting Links | Cool Stuff |
Advanced
Topics in Inverted Hierarchies
This section is intended to be read by students with some
familiarity with DSPD and with inverting hierarchies, but need to
know more about inverting more complex hierarchies. If you are
just getting started with the method this section should be
skipped.
Even if you are an advanced student, you should consider the possibility of breaking apart complex mappings as separate passes, to avoid having to invert complicated hierarchies.
Partially
Inverted Hierarchies
When using inverted hierarchies to resolve structure clashes in
program designs, we do not necessarily invert the entire
hierarchy. In the calendar example discussed earlier, we inverted
"week" with respect to "day" because the
clashing hierarchy--year/quarter/month--also had a
"day" level of hierarchy. A "partially
inverted" hierarchy is one which is inverted with respect to
some "middle" level instead of to the lowest level in
the hierarchy. For instance, the diagram which follows shows the
year/quarter/month/day hierarchy inverted with respect to
"month."
Notice that when partially inverting a hierarchy, the part of the hierarchy above the level you are inverting to follows the normal pattern of inversion. The part of the hierarchy below the level you are inverting to is unaffected by the inversion.
Inverting
Structures Containing Alternatives
Occasionally, it is necessary to invert hierarchies containing
alternation. This is easily done if you remember the concurrency
operator. For instance, consider the diagram below...
This hierarchy is equivalent to...
In other words, within an attorney, major clients are listed and minor clients are listed, but in no particular order. This is the same as saying that within an attorney, clients are listed, each one of which is either major or minor (the top picture). The two concurrent hierarchies can be inverted as follows...
and then "glued" back together as...
Notice that the levels common to both the major and minor client levels can be "factored up to the left as follows...
This completes the inversion.
Inverting
"0,n" Hierarchies (if you really, really have to)
Note that this topic should be considered VERY advanced, and
if you have wandered in here casually you probably should wander
right back out again until you have to do this.
Inverting "0,n" repeating levels is a bit different from inverting "1,n" repeating levels. This is due to the relationship of the "0,n" structure and alternation: a "0,n" level is the same as a "1,n" level INSIDE an alternative "0,1". To invert "0,n" levels, we resort to the same kind of strategy just discussed when inverting alternative levels. Consider the following diagram...
We first eliminate the "0,n" levels by translating them into "1,n" levels inside "0,1" alternatives as follows.
This alternative structure is translated to the concurrent form...
Each "leg" of the hierarchy is inverted normally...
Notice that this structure would require three different "types" of ideal records. A record for an inactive company (which would be the only record in the ideal file if the company were inactive), a record for each inactive agent (with no product information), and a record for each product within an active agent. Thus we can "glue" the three concurrent inverted structures back together at the "ideal record" level: the diagram tells us how to process one "ideal record" at a time.
Home | What's New | What's Old | Articles | Associates | Interesting Links | Cool Stuff |
This web site and all
material contained herein is Copyright ©2002-2009 Dave
Higgins. All Rights Reserved. For additional information,
please contact me at: |