In this article
A hierarchy is a type of question where the answers are ranged in more than one level. The respondent "enters" the question at the top level, whereupon the answer options in the next level become viewable. When the respondent selects an answer option in that level, the options in the next level (if one exists) become viewable, and so on. Each answer option in a lower level is accessible through only one option in the higher level. This results in a tree-like structure, with one trunk splitting into several branches, and each branch splitting further and ending finally at a leaf. Each leaf can only be reached by following one specific route through the tree. A hierarchy can have as many levels as required, and as many options in each level as required. When the hierarchy question is used in a Reportal report, it acts as a filter.
In the Forsta Database Designer, you can set up two different types of hierarchies; abalanced (or “snowflake” or "non self-referencing") hierarchy (- ) and an unbalanced (or “parent-child” or "self-referencing") hierarchy - .
In a balanced (snowflake / non self-referencing) hierarchy every possible path from the top to the bottom of the tree goes through the same number of levels (as with the three levels in the figure below - ). Such a hierarchy is set up with a table for every level in the tree, and the relationships between the items are defined by setting a relation between the table representing a specific level and the table representing the level above. The respondent selects from the entities at the lowest level.
Figure 1 - Example of a Balanced hierarchy
An example of this could be the relationship between continents and countries. The Earth is divided into a number of continents, and each continent is divided into a number of countries. The respondent can therefore select a continent, then a country.
In an unbalanced (parent-child / self-referencing) hierarchy the different branches do not need to have the same number of sub-levels, as in the figure below - . In a hierarchy like this, the entire hierarchy is defined in one table, with relations between elements in the same table (self-referencing). The respondents can select from the entities at any level in the hierarchy, including the top node(s). An example of this is a typical company organization hierarchy.
Figure 2 - Example of an Unbalanced hierarchy
The Hierarchy Wizard provides you with a simple way of creating a hierarchy by following a step-by-step procedure.
Important
Hierarchies can only be created for single questions, and the question must be indexed (go to General for more information).