Dimensions are used to provide context to facts. They can also be drilled down upon. Dimensions can either be orthogonal to each other or related via parent-child relationships.
When there are dimensions related via parent-child relationships, Dimension Hierarchies are formed.
Dimension Hierarchies
There are many aspects of dimension hierarchies.
Level-Based vs Value-Based.
- Level-based: clearly defined parent-child levels.
- Value-based: parent-child relationships within values at the same level (e.g. people relationships).
- Balanced: all branches descend to the same depth.
- Unbalanced: some branches stop having children at certain depth where other branches continue having children.
- Null values can appear in the middle of a hierarchy, with child values continuing beyond. i.e. it is possible to skip one level.
- Simple: dimension hierarchies do not cross (i.e. levels & values overlap).
- Multiple Path: dimension hierarchies cross, but criteria for analysis is same.
- Parallel Path: dimension hierarchies cross, and criteria for analysis can be different (e.g. city in business unit vs location hierarchies).
- Each child dimension value can only have one parent.
- Dimension hierarchy data are usually normalized in source data and staging area, but flattened into a single dimension table in the data warehouse.
- Create a root node at the top that represents "ALL".
No comments:
Post a Comment