Databases Reference
In-Depth Information
The current coordinate of the Year attribute hierarchy would be ALL , and the preceding
query would return the member ALL . But, this is not what you really wanted; you meant
to request the member 1998 . To prevent such errors, Analysis Services applies an algorithm
called strong relationships .
You'll have an easier time understanding the strong relationships algorithm if you go back
and review attribute relationships, covered in Chapter 5. In an attribute relationship, there
is one value of the related attribute for each unique value of an attribute.
For example, for each unique value of the Quarter attribute, there is a corresponding
unique value of the Year attribute; and for each unique value of the Day attribute, there is
a unique value of the Month attribute. Therefore, Day relates to Month , Month relates to
Quarter , and Quarter relates to Year . So, we can say that Quarter is a related attribute to
the Month attribute and is a relating attribute to the Year attribute.
You can think of these relationships as similar to a native hierarchy that is automatically
created for you. In Analysis Services 2000, which has hierarchy-based architecture, it's not
possible to change the current coordinate for quarter without also changing it for the
year. By implementing the strong relationships algorithm, we are trying to achieve the
same behavior.
When you create a current coordinate with strong relationships, Analysis Services changes
not only the value of the attribute specified in the query or expression but also its related
and relating attributes. In our example, not only is the Quarter attribute overwritten, but
also the Year , Month , Day , and any other attributes related to the Quarter attribute.
When an attribute is overwritten because it is a related or relating attribute, an implicit
overwrite occurs. In general, implicit overwrite occurs according to the following rules:
.
The attribute related to the current one (on top of the current one) is overwritten
with the related value. For example, when the current attribute— Quarter —is over-
written with the value Q1, 1998 , the Year attribute is overwritten with 1998 .
.
The attributes relating to the current one (below the current one) are overwritten
with the member ALL .
However, when an attribute is overwritten as a result of an implicit overwrite, its own
related and relating attributes are not overwritten. For example, if, in the Time dimension
the attribute Quarter is overwritten, all the attributes above it are overwritten with their
related values ( Year is overwritten with the member 1998 ), and all the attributes below it
are overwritten with the member ALL . But after the attribute Year is implicitly overwritten,
its relating attribute, Week , is not overwritten. Figure 11.15 demonstrates these rules.
If we finally execute the MDX query that we started with at the beginning of this section
SELECT [Time].[Year].CurrentMember ON COLUMNS FROM [Warehouse and Sales]
WHERE [Time].[Time].[Quarter].&[Q1]&[1998]
Search WWH ::




Custom Search