Creating a Snowflake Dimension

A snowflake dimension is a dimension that is created using a set of dimension tables. A snowflake dimension normally suggests that the tables in the data source have been normalized. Normalization is the process by which tables of a relational database are designed to remove redundancy and are optimized for frequent updates. Most database design books, including The Data Warehouse Toolkit by Ralph Kimball (Wiley, 1996) and An Introduction to Database Systems by C. J. Date (Addison Wesley, 2003), talk about the normalization process in detail.

The columns from different tables of a snowflake dimension often result in levels of a hierarchy in the dimension. The best way to understand a snowflake dimension is to create one yourself. To create one we're going to need two additional tables added from the source to our DSV. Here is how to add the two tables:

  1. Open the AdventureWorksDW DSV and click on the Add/Remove Tables icon (top left icon in the DSV).

  2. Control-Click on "dbo.DimProductCategory" and "dbo.DimProductSubcategory" and click the right arrow > to move the two tables from the source to the DSV. Click OK to continue.

Now that you have the necessary tables, the following steps describe how to create a snowflake dimension called DimProducts from AdventureWorksDW.

  1. Launch the Dimension Wizard, accept the defaults, and proceed through the pages of the Wizard to the "Select Main Dimension Table" screen. Select the dbo.DimProduct Table from the dropdown list box for Main Table, then click Next.

  2. The Select Related Tables screen shows the tables DimProductCategory and DimProductSubCategory. These tables together with the DimProduct table form the snowflake dimension "DimProduct" which we're creating. Select DimProductCategory and the DimProductSubCategory tables on this page and proceed to the next screen by clicking Next.

  3. Accept the defaults and proceed through the pages until you get to the "Review New Hierarchies" screen. The Dimension Wizard detects a hierarchy with three levels, as shown in Figure 5-28. This hierarchy is created from columns in the three dimension tables that you selected earlier in the wizard.

    image from book
    Figure 5-28

  4. Accept the defaults and complete the wizard. You've now successfully created a snowflake dimension with one hierarchy and several attributes in Analysis Services 2005. The DSV of this dimension shows the three dimension tables.

You can perform most of the same operations in a snowflake dimension as you can in a star schema dimension, including adding attributes, creating hierarchies, and defining member properties. Notice that the levels of the hierarchy are actually referring to attributes that have been created from the three dimension tables in the DSV pane. The wizard also defines the member properties for the levels in the multi-level hierarchy. The member properties of a specific level defined by the Dimension Wizard are all the columns that are part of the dimension table. The member properties for the level Dim Product Category are English Product Category Name, French Product Category Name, Spanish Product Category Name. and Product Category Alt Key which are all the remaining columns in the Dim Product Category table from which the attribute Dim Product Category has been defined. You have successfully created a snowflake dimension. You can now deploy the project and browse the dimension similar to that of a star schema dimension.

Professional SQL Server Analysis Services 2005 with MDX
Professional SQL Server Analysis Services 2005 with MDX (Programmer to Programmer)
ISBN: 0764579185
EAN: 2147483647
Year: 2004
Pages: 176 © 2008-2017.
If you may any questions please contact us: