Getting Started with ASP.NET MVC - Part 5: How to do programming with razor syntax
First Time? You can support us by signing up. It takes only 5 seconds. Click here to sign up. If you already have an account, click here to login.


Upload Image Close it
Select File

Career advice for the IT professional
Browse by Tags · View All
SQLServerPedia Syndication 152
SQL Server 54
SSAS 35
#SQL SERVER 19
2012/Denali 17
SSIS 17
Denali 14
Career 12
Data warehouse 10
SQL Server 2012 10

Archive · View All
June 2011 20
August 2011 15
July 2011 15
March 2012 15
October 2011 14
September 2011 14
May 2011 13
November 2011 12
February 2012 11
April 2012 10

James Serra's Blog

Role-playing Dimensions

Nov 28 2011 12:00AM by James Serra   

Dimensions are often recycled for multiple purposes within the same database.  For instance, a “Date” dimension can be used for “Date of Sale”, as well as “Date of Delivery”, or “Date of Hire”.  This is often referred to as a “role-playing dimension”.

Basically, if the same dimension is used more than once with different names in the cube then it is called the role- playing dimension.  For example, suppose we are designing a cube which captures purchasing data, we can have multiple dates in this scenario like Order Date, Ship Date, Order Received Date, etc.  In these kinds of situations we need to have different date keys stored in the fact tables (like OrderDateKey, ShipDateKey etc…) to get the different date information while browsing the cube.  To handle this situation we do not need to create the “n” number of database dimensions for dates in the cube.  What we can do instead is to just create one date database dimension when designing the cube and others can use the same dimension but with different name.  For example, we created a database dimension called ”DimOrderDate” and other date dimensions can be created by using the same database dimension with different names like “DimShipDate”, “DimOrderReceivedDate”, etc.  And these remaining date dimensions should be the cube dimensions (In SSAS, under the Cube Structure Tab–>In the Dimension Section–>Right Click on the Cube–>Add Cube Dimension–>Select existing “DimOrderDate”–>Give another name for example “DimShipDate”).  The key thing here is to keep in mind we should have only one date database dimension and other date dimensions should be created as cube dimensions.  This means in the cube we will have many different date dimensions but behind the scenes we are only using one database dimension.  Creating one database dimension and others as cube dimensions will also save some memory usage as the cube database date dimension will be processed only once and other dimensions will use the same date dimension.

In this illustrated example, the DimDate table serves as three different roles, the order date, due date and the ship date:

More info:

Add Cube Dimension Dialog Box (Analysis Services – Multidimensional Data)

Setting role security in SSAS for a role-playing dimension

SSAS: Consider Cube Browsing when Building Role Playing Dimensions


Republished from James Serra's Blog [3 clicks].  Read the original version here [4361 clicks].

James Serra
12 · 14% · 3074
0
Liked
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

    Copyright © Beyondrelational.com Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising