Databases Reference
In-Depth Information
To define parent-child relationship, you create two attributes: a key attribute that has a list
of all the employees, and the parent attribute that contains an ID of the employee's
manager, as shown in Figure 8.1. Thus, from relational prospective, the parent attribute
provides a self join to the key attribute. For example, for the Employees dimension, we
define an Employee attribute as the key attribute and a Manager attribute as parent
attribute. The employee ID of the manager references the ID in the Employee attribute,
because every manager is also an employee of an organization.
Manager
FIGURE 8.1
Parent-child relationship in the Employees dimension.
To define an attribute as a parent, use the Usage parameter of an attribute. After you create
a parent attribute and start to process a dimension, Analysis Services analyzes the structure
of relationships between members in key and parent attributes. It detects relationship and
recognizes that some members have no parents. Others might have only one parent
(ancestor) above them, some might have two ancestors, and so on. At this time, the
system creates physical attributes corresponding to each level of the parent-child relation-
ship. The key attribute is divided into a set of attributes, according to their relationships.
Each attribute will contain only members that have the same types of relationships with
its siblings—and have the same number of ancestors (see Figure 8.2). You can use the
Naming template and the Naming Template Translation parameters of the parent attribute
to give names to these real attributes.
Search WWH ::




Custom Search