显式层次结构 (Master Data Services)Explicit Hierarchies (Master Data Services)

适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) - 仅限 Windows 是Azure SQL 托管实例Azure SQL Managed InstanceYesAzure SQL 托管实例Azure SQL Managed Instance适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) - Windows only 是Azure SQL 托管实例Azure SQL Managed InstanceYesAzure SQL 托管实例Azure SQL Managed Instance

Master Data ServicesMaster Data Services中,显式层次结构以您指定的任意方式组织一个实体中的成员。In Master Data ServicesMaster Data Services, an explicit hierarchy organizes members from a single entity in any way you specify. 显式层次结构可以是不规则的,并且与派生层次结构不同,该结构不依据基于域的属性关系。The structure can be ragged and unlike derived hierarchies, explicit hierarchies are not based on domain-based attribute relationships.

备注

显式层次结构已弃用。Explicit hierarchy is deprecated.

合并成员将其他成员分组Consolidated Members Group Other Members

显式层次结构使用您为将其他成员分组而创建的合并成员。An explicit hierarchy uses consolidated members that you create for the purpose of grouping other members. 这些合并成员一次只能属于一个显式层次结构。These consolidated members can belong to only one explicit hierarchy at a time. 显式层次结构还包括关联的实体中的所有叶成员。An explicit hierarchy also includes all of the leaf members from the associated entity.

显式层次结构可以是不规则的,这意味着层次结构可以同时在不同级别结束。An explicit hierarchy can be ragged, which means that the hierarchy can end at different levels simultaneously. 每个合并成员下面可以有不限数目的合并成员和叶成员,也可以没有任何成员。Each consolidated member can have an unlimited number of consolidated and leaf members underneath, or can have none. 叶成员可以在单个合并成员下,也可以在多个级别的合并成员下。The leaf members can be under a single consolidated member or under multiple levels of consolidated members.

备注

在创建显式层次结构前,必须为显式层次结构启用了实体。Before you can create an explicit hierarchy, the entity must be enabled for explicit hierarchies.

显式层次结构的类型Types of Explicit Hierarchies

显式层次结构有两种类型:强制和非强制。There are two types of explicit hierarchies: mandatory and non-mandatory.

强制显式层次结构Mandatory Explicit Hierarchy

强制显式层次结构要求所有叶成员必须包含在层次结构树中。A mandatory explicit hierarchy is a hierarchy in which all leaf members must be included in the hierarchy tree. 默认情况下,所有成员都包含在该树的根上。By default, all members are included at the root of the tree. 您可以根据需要重新排列成员。You can rearrange the members as needed.

非强制显式层次结构Non-Mandatory Explicit Hierarchy

非强制显式层次结构是所有叶成员都处于系统创建的“未使用”节点中的层次结构。A non-mandatory explicit hierarchy is a hierarchy in which all leaf members are in a system-created Unused node. 可以根据需要将成员移出此节点。You can move members out of this node as you need them. 其余成员可以保留在 “未使用” 节点中。The rest of the members can remain in the Unused node.

使用非强制显式层次结构时,对层次结构所做的任何报告或分析可能与对强制层次结构所做的报告或分析不一致。When you use non-mandatory explicit hierarchies, any reporting or analysis done on the hierarchy may not match reporting or analysis done on mandatory hierarchies.

规则Rules

下列规则适用于(强制和非强制)的显式层次结构:The following rules apply to explicit hierarchies (both mandatory and non-mandatory).

  • 每个叶成员只能在层次结构中包含一次。Each leaf member can be included in the hierarchy only once.

  • 必须在层次结构中包含所有合并成员。All consolidated members must be included in a hierarchy.

  • 合并成员不能在多个显式层次结构中。Consolidated members cannot be in more than one explicit hierarchy.

  • 层次结构树中的合并成员不要求其下面还包含叶成员。Consolidated members in the hierarchy tree do not have to contain leaf members underneath them.

  • 如果删除显式层次结构,将删除该层次结构中使用的所有合并成员。If you delete an explicit hierarchy, all consolidated members that were used in the hierarchy are deleted.

  • 如果删除显式层次结构中的合并成员,则将按该合并成员分组的所有叶成员移到根部。If you delete a consolidated member that was in an explicit hierarchy, all leaf members that were grouped by that consolidated member are moved to the root.

显式层次结构与派生层次结构Explicit Hierarchies versus Derived Hierarchies

下表显示显式层次结构与派生层次结构之间的一些区别。The following table shows some of the differences between explicit and derived hierarchies.

显式层次结构Explicit Hierarchies 派生层次结构Derived Hierarchies
结构是由用户定义的Structure is defined by the user 结构是从基于域的属性间的关系派生的Structure is derived from the relationships between domain-based attributes
包含单个实体的成员Contains members from a single entity 包含多个实体的成员Contains members from multiple entities
使用合并成员对其他成员进行分组Uses consolidated members to group other members 使用来自一个实体的叶成员对其他实体的叶成员进行分组Uses leaf members from one entity to group leaf members from another entity
可以是不规则的Can be ragged 始终包含一致的级别数Always contains a consistent number of levels

显式层次结构示例Explicit Hierarchy Example

在下面的示例中,Product 实体包含以下叶成员:BK-M101 {Mountain-100}、BK-M201 {Mountain-200}、BK-M301 {Mountain-300}、BK-R150 {Road-150}、BK-R450 {Road-450} 和 BK-R650 {Road-650}。In the following example, the Product entity contains these leaf members: BK-M101 {Mountain-100}, BK-M201 {Mountain-200}, BK-M301 {Mountain-300}, BK-R150 {Road-150}, BK-R450 {Road-450}, and BK-R650 {Road-650}.

若要在特定的合并点汇总这些叶成员,您可以在 Product 实体中创建合并成员。To summarize these leaf members at specific consolidation points, you can create consolidated members in the Product entity. 在要汇总叶成员的层次结构树的级别中插入合并成员。Insert the consolidated members at levels in the hierarchy tree where you want to summarize the leaf members. 对插入合并成员的位置没有限制,但是每个成员(叶成员或合并成员)只能使用一次。There is no limitation on where you insert your consolidated members; however, each member (leaf or consolidated) can be used only once.

山地车显式层次结构示例Mountain Bike Explicit Hierarchy Example

合并成员可用于将任何级别的成员分组,叶成员和合并成员按您确定的顺序排序。Consolidated members can be used to group members at any level, and leaf and consolidated members are sorted in the order you determine.

任务说明Task Description 主题Topic
创建新的显式层次结构。Create a new explicit hierarchy. 创建显式层次结构 (Master Data Services)Create an Explicit Hierarchy (Master Data Services)
更改现有显式层次结构的名称。Change the name of an existing explicity hierarchy. 更改显式层次结构名称 (Master Data Services)Change an Explicit Hierarchy Name (Master Data Services)
删除现有显式层次结构。Delete an existing explicit hierarchy. 删除显式层次结构 (Master Data Services)Delete an Explicit Hierarchy (Master Data Services)