Named and Unnamed Levels

A data source supports named levels if it can refer to all members at a particular level of a hierarchy by a name. In the SalesData cube, Continents is the name of the member set at level 1 (root = 0) of the hierarchy. This set has the members {Europe, North America}.

Not all multidimensional data sources support named levels. Many sources support the concept of a level as a set of members that occur at a given distance from the root of the hierarchy. In such a data source, users cannot give the name “Continents” to a set of members. Instead, they need to decide which members occur at a distance of one from the root of the World-Continent hierarchy.

OLE DB for OLAP does not require a data source to support named levels. The LEVELS and MEMBERS rowsets contain information about both the level name and the level position (that is, the distance of the level from the root). OLE DB for OLAP does require that, if the provider does not support named levels, the provider must make up a dummy level name containing all members of a hierarchy (or a dimension). The dummy name must be the name of the dimension.

As mentioned in “Browsing Members,” the MEMBERS rowset contains additional columns at the end, one column for each property. When asking for the MEMBERS rowset, OLE DB for OLAP requires that the restrictions together unambiguously identify a level. When the provider does not support named levels, all members belong to a dummy level. Consequently, a restriction based on the LEVEL_NAME column has no effect. The consumer can specify additional restrictions on LEVEL_NUMBER, MEMBER_NAME, PARENT_UNIQUE_NAME, and so on. The resulting rowset will have property columns for the union of the properties of each member in the rowset. Each row in the rowset (which describes a member) will have values for property columns that apply to that member. Values for all other property columns are NULL.