Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
SQL Server Analysis Services 2012 Cube Development Cookbook

You're reading from   SQL Server Analysis Services 2012 Cube Development Cookbook If you prefer the instructional approach to a lot of theory, this cookbook is for you. It takes you straight into building data cubes through hands-on recipes, helping you get to grips with SQL Server Analysis Services fast.

Arrow left icon
Product type Paperback
Published in Dec 2013
Publisher Packt
ISBN-13 9781849689809
Length 340 pages
Edition 1st Edition
Arrow right icon
Toc

Table of Contents (14) Chapters Close

Preface 1. Introduction to Multidimensional Data Model Design FREE CHAPTER 2. Defining Analysis Services Dimensions 3. Creating Analysis Services Cubes 4. Extending and Customizing Cubes 5. Optimizing Dimension and Cube Processing 6. MDX 7. Analysis Services Security 8. Administering and Monitoring Analysis Services 9. Using Tabular Models 10. DAX Calculations and Queries 11. Performance Tuning and Troubleshooting Tabular Models A. Miscellaneous Analysis Services Topics Index

A sample scenario for choosing the Snowflake schema

Here's an example of a design decision process that would lead you to a Snowflake dimension. Start by assuming that all the dimensions in the Data Mart (versus the Data Warehouse, where we may have different ideas) will be modeled as Stars.

We start in our first design with a single dimension, Geography, containing the following columns:

  • skGeography (surrogate key)
  • PostalCode (business key)
  • CityID
  • CityName
  • StateID
  • StateName
  • CountryID
  • CountryName

We have one fact source table containing, say, population data with the following columns:

  • CensusDate
  • PostalCode
  • PopulationCount

In ETL, we would join this source table to the dimension table on the business key PostalCode to retrieve the surrogate key and use this to load the data mart fact table:

  • CensusDate
  • skGeography
  • PopulationCount

Now, let's introduce a second fact source table containing projected population data, but with a different grain. Let's assume this data comes in, not at the Postal Code grain but rather at the State grain. We'd have a source table with columns such as follows:

  • ProjectionDate
  • StateID
  • ProjectedGrowth

We can't join this new source table to our existing Geography dimension because if we do so, we will get back many surrogate keys—each representing one postal code within the specified state. So, we need to Snowflake (partially normalize) the Geography dimension so that it will support the grain of each of our fact source tables, giving us two dimension tables similar to the the following two bullet lists:

dimGeography:

  • skGeography
  • PostalCode
  • CityID
  • CityName
  • skGeographyState

and dimGeographyState:

  • skGeographyState
  • StateID
  • StateName
  • CountryID
  • CountryName

Notice that we did not fully normalize the dimension (postal code and city both exist in the first table, state and country in the second). We just normalized the dimension enough to give us a single relationship between each of our two facts and this dimension.

You have been reading a chapter from
SQL Server Analysis Services 2012 Cube Development Cookbook
Published in: Dec 2013
Publisher: Packt
ISBN-13: 9781849689809
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image