Tracy.Bai

Focus on Data analysis and Mining

导航

sql server 2005 analysis service step by step(三):创建父子维度

1.什么是父子维度。

the parent-child relationship in the table that the wizard detected by the self-referencing join
on the table.
例如在Dim.Employee表中有个外键是ParentEmployeeKey,她关联的主键就是.Employee表的EmployKey建。

2. 创建父子维度

1. Open SSAS Step by Step DW.dsv.
2. Right-click the background of the Data Source View Diagram pane, and then click Add/
Remove Tables.
3. In the Add/Remove Tables dialog box, double-click dbo.DimEmployee in the Available
Objects list to move this table to the Included Objects list, and then click OK.
Notice the self-referencing relationship for the DimEmployee table in the DSV. This relationship
is indicated by the arrow leading from the DimEmployee table back to itself.
4. In Solution Explorer, right-click the Dimensions folder, click New Dimension, click
Next, clear the Auto Build check box, click Next, click the SSAS Step by Step DW DSV,
and then click Next twice.
5. Click dbo.DimEmployee in the Main Table drop-down list, click EmployeeKey in the
Key Columns list, click LastName in the Column Containing The Member Name dropdown
list, and then click Next.
6. On the Select Dimension Attributes page of the wizard, select the check box next to
ParentEmployeeKey.
You must include the attribute that defines the foreign key column of a record in a parentchild
dimension.
7. Click Next twice.

Click Next, change the name of the dimension from Dim Employee to Employee, and
then click Finish.
The Employee parent-child dimension is now added to your project.
9. In the Attributes pane of the Dimension Structure tab, right-click Dim Employee, click
Rename, and then type Employee.
10. Repeat the previous step to rename Parent Employee Key as Employees.
11. Keeping Employees selected in the Attributes pane, open the Properties window and
locate the Usage property.

3.父子维度的数据聚合。

4.管理父子维度的级别。

posted on 2009-04-27 22:47  Love Fendi  阅读(443)  评论(0编辑  收藏  举报