Databases Reference
In-Depth Information
activity uses a lot of resources, especially when some of the dimension members are stored
in a relational database (a ROLAP dimension). In addition, referencing the object by name
can also cause ambiguous results in some circumstances (for example, when there are
members with the same name in different dimensions, such as USA in both the Customer
and Product dimensions).
By Qualified Name
Another way to identify a dimension, hierarchy, level, or member is to use a qualified name:
.
For a dimension, this method is almost equivalent to identifying it by name. The
only requirement is that the name is surrounded by brackets ( [ and ] ). For example:
[Time]
.
For a hierarchy, a qualified name is the qualified name of the dimension separated
from the name of the hierarchy with a period ( . ). For example:
[Time].[Time]
.
For a level, a qualified name is the qualified name of the hierarchy concatenated
with a period ( . ) and the name of the level. For example:
[Time].[Time].[Year]
.
For a member, a qualified name is the qualified name of the level or hierarchy
followed by the names of all the parents of the current member and the name of the
current member. For example:
[Time].[Time].[1998].[Q1].[January]
Referencing objects by qualified names is the oldest way of referencing objects, and is
somewhat faster than referencing object by names. It works quite well for dimensions,
hierarchies, and levels, but it has many drawbacks for specifying a member.
If a qualified name is created by concatenating the names of the member's parents, the
name becomes immobile. It becomes outdated if the member is moved from one parent to
another. Think about a customer in the Customers hierarchy: That customer could move
to a different city, and the name of the member that represents it would be invalidated.
By Unique Name
The third (and, in our view, the correct) way of referencing an object is to use its unique
name. Analysis Services assigns a unique name to every dimension, hierarchy, level, and
member. The client application that generates MDX or programmer who writes an MDX
query can retrieve the unique name of the object using a schema rowset or from the
results of another MDX request.
In the current version of Analysis Services, the unique name of a member is usually gener-
ated based on the member key, but there are quite complicated rules for the unique name
generation. We aren't going to provide those rules in this topic for a reason. The OLE DB
for OLAP specification is quite strict about one rule: An MDX writer should never generate
a unique name himself; a unique name should be retrieved from the server.
Search WWH ::




Custom Search