Mark has already explained the new Parent-Child hierarchy new feature in 11g here.
Parent Child hierarchies are different from normal level based
hierarchies not only in the nature of their structure but also in the
way aggregations are done. For example, in a level based hierarchy, the
most common type of aggregation that is done involves rolling up the
numbers from the lower most level. But in the case of parent-child
hierarchy, an aggregation by default enforces the roll-up across all
descendant members. To understand this lets try to take this through an
example.
Lets consider a sales department with the employee hierarchy shown below
![](http://www.rittmanmead.com/wp-content/uploads/2010/08/Picture_2-thumb7.png)
1. As an attribute – Show the salary of each employee as an attribute in the parent child hierarchy.
2. As a measure (All intermediary Roll-ups) – Roll-up the salary figures of all the employees who roll into the employee. For example, Scott King will have a Salary equal to sum of salaries of all the employees who report to him, including the ones who are his direct & in-direct reporting employees.
3. As a measure (Level-0 Roll-up) – Roll-up the salary figures from the lower most level till the top node For example, in the above figure, Scott King will have a Salary Roll-up figure of all the employees who are the lowermost level (not including the intermediary nodes – very similar to normal level based hierarchy roll-ups)
2. As a measure (All intermediary Roll-ups) – Roll-up the salary figures of all the employees who roll into the employee. For example, Scott King will have a Salary equal to sum of salaries of all the employees who report to him, including the ones who are his direct & in-direct reporting employees.
3. As a measure (Level-0 Roll-up) – Roll-up the salary figures from the lower most level till the top node For example, in the above figure, Scott King will have a Salary Roll-up figure of all the employees who are the lowermost level (not including the intermediary nodes – very similar to normal level based hierarchy roll-ups)
The above requirement is quite straightforward,
but to achieve similar such aggregations in a normal level-based
hierarchy, we will have introduce fragmentation & other techniques.
But with parent-child hierarchy modeling now available in BI EE, all the
above 3 requirements can quite easily be achieved.
Following is the employees parent child table that stores all the attributes of an employee
![](http://www.rittmanmead.com/wp-content/uploads/2010/08/Picture_3-thumb5.png)
![](http://www.rittmanmead.com/wp-content/uploads/2010/08/Picture_4-thumb7.png)
![](http://www.rittmanmead.com/wp-content/uploads/2010/08/Picture_5-thumb8.png)
![](http://www.rittmanmead.com/wp-content/uploads/2010/08/Picture_6-thumb9.png)
![](http://www.rittmanmead.com/wp-content/uploads/2010/08/Picture_7-thumb9.png)
![](http://www.rittmanmead.com/wp-content/uploads/2010/08/Picture_8-thumb10.png)
![](http://www.rittmanmead.com/wp-content/uploads/2010/08/Picture_9-thumb7.png)
![](http://www.rittmanmead.com/wp-content/uploads/2010/08/Picture_10-thumb8.png)
![](http://www.rittmanmead.com/wp-content/uploads/2010/08/Picture_11-thumb7.png)
![](http://www.rittmanmead.com/wp-content/uploads/2010/08/Picture_12-thumb4.png)
![](http://www.rittmanmead.com/wp-content/uploads/2010/08/Picture_13-thumb4.png)
No comments:
Post a Comment