Level Interface
[!附註]
下一版的 Microsoft SQL Server 將不再提供此功能。請勿在新的開發工作中使用此功能,並且儘速修改使用此功能的應用程式。
Levels describe the hierarchy within a dimension from the highest (most precalculated) to the lowest (most detailed) levels of data.
The following table shows an example of level positions of a time dimension in which the most detailed (day) values are included in the next level (week), which are, in turn, included in the next level (quarter), and so on. If the Year level has 4 members, 1994 through 1997, then the Quarter level has 4 members for each year, and the Week level has 52 members for each year.
Level |
Position in hierarchy |
---|---|
Year |
1 |
Quarter |
2 |
Week |
3 |
Day |
4 |
In Decision Support Objects (DSO), objects that implement the Level interface have one of the following ClassType property values.
ClassType |
Description |
---|---|
The levels contained within an aggregation dimension objects levels collection |
|
The levels of all dimensions assigned to a cube |
|
The levels of all dimensions within a database |
|
The levels of all of the dimensions contained within a partition |
Additionally, the SubClassType property for level objects can have the following values.
Subclass type |
Description |
---|---|
sbclsRegular |
A regular level |
sbclsParentChild |
A parent-child level |
The Level interface provides a number of properties to manipulate these objects. For more information about levels and other objects, see Introducing Decision Support Objects.
Differences in the implementation of the Level interface exist between the derived objects. Some objects provide read-only access to a few Level properties, while others implement a subset of the properties contained in the interface. For example, a clsDatabaseLevel object allows read and write access to its LevelType property, whereas, for a clsPartitionLevel object, access to this property is read-only. For more information about the Level interface properties and their applicability to the associated objects, see Collections, Level Interface and Properties, Level Interface.
There are no methods associated with the Level interface.
Parent-Child Levels
Parent-child levels appear only in parent-child dimensions (those whose SubClassType is sbclsParentChild). Unlike regular levels that are constructed using predefined member columns, parent-child levels function as templates for hierarchies that are dynamically built from source tables with parent-child relationships. Parent-child levels identify the MemberKeyColumn, MemberNameColumn, and ParentKeyColumn properties of the data source, which are used to dynamically build variable-level hierarchies.