on 01-21-2013 5:34 AM
Hi All,
Can any one explain me Parent child hierarchy with example?
Regards
Pooja
Hi Pooja,
There are 2 types of Hierarchies in HANA:
1. Parent Child
2. Level
Parent Child hierarchy is one where you have one child field and one parent field. For example, let's say we have a table in which we have the details about the employees of a department and there sub-ordinates. Now there are only 2 fields in this table: 1. Child; 2. Parent and the data is as follows:
Child Parent
Matt ?
Brian Matt
Joe Matt
Kelly Brian
Kate Joe
Here in the above scenario, Matt is the ultimate boss of the deparment. Matt has 2 sub-ordinates: Brian and Joe. Brian and Joe have Kelly and Kate as their respective sub-ordinates.
Now, this kind of hierarchy is known as a Parent Child Hierarchy. When you need to model this kind of hierarchy in HANA you need to make sure that all the nodes of the hierarchy are present in the Child column atleast once. And the top most node should have Null as its parent.
On the other hand Level Hierarchy will have following kind of structure in your base table:
Level1 Level2 Level3
Matt Brian Kelly
Matt Joe Kate
Here you can see that the data is organized based on there level into different fields. So when you need to model a Level Based Hierarchy in HANA, you need to know the maximum depth of the hierarchy. i.e. if in future, Kelly and Kate have sub-ordinates assigned to them then the level hierarchy structure needs to be modified (adding Level4 in the structure) to include those new sub-ordinates as well. But in case of parent child hierarchy, this is not an issue as there will always be only 2 fileds (Child and Parent) in the hierarchy structure.
Regards,
Piyush
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pooja,
As i have mentioned in the above post, if in future, Kelly and Kate also have get their sub-ordinates, say Kelly gets a sub-ordinate named Brad and Kate gets a sub-ordinate named Bil then the Level Hierarchy has to be modified to include this new level. The hierarchy structure will then have 4 levels:
Level1 Level2 Level3 Level 4
Matt Brian Kelly Brad
Matt Joe Kate Bil
So essentially, as and when the depth of hierarchy increases, you need to modify the structure of the hierarchy. That is why it is rigid in nature.
But in case of a Parent Child hierarchy, the structure will remain same as it requires only to columns to be present.
Regards,
Piyush
Hi Pooja,
It all depends on the perception of the designer
Actually, according to me, when you compare the level hierarchy with the parent child hierarchy, the later does not need any modification in the structure of the hierarchy created in HANA even if the depth of the hierarchy changes which makes it much more scalable than the level hierarchy. The Level Hierarchy needs to be modified everytime the depth changes which makes it less scalable.
Hope this helps you in understanding the Hierarchy better.
Regards,
Piyush
Pooja,
Also refer to the below online link to get a simple overview and steps required to create hierarchies in BW:
http://help.sap.com/saphelp_nw04/helpdata/en/0e/fd4e3c97f6bb3ee10000000a114084/content.htm
Regards,
Rama
User | Count |
---|---|
78 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.