Data is timestamped. Using smalldatetime provides minute resolution. However, different reports may need 5 minute, 10 minute, 1 hour, daily, weekly, or monthly aggregates.
In my experiencie the besto solution is to make a snowflake time dimension. A separate table for each level do you want to represent. Then you should specify hierarchies. For the key it's convenient to make them char and not timestamp. Because the representation of it depends of the client application. For example: Tables for time dimension: Dim_Date_STD_Year Dim_Date_QRT_Quarter Dim_Date_STD_Month Dim_Date_WEK_Week Dim_Date_STD_Day Dim_Date_HOU_Hour Dim_Date_HOU_Minute
With this schema you can construct any hierarchie you want. For example: Hierarchie: Standard (Dim_Date_STD_Year , Dim_Date_STD_Month, Dim_Date_STD_Day) Hierarchie: Quarter (Dim_Date_STD_Year, Dim_Date_QRT_Quarter, Dim_Date_STD_Month, Dim_Date_STD_Day)
================================================== Mosha Pasumansky - http://www.mosha.com/msolap Analysis Services blog at http://www.sqljunkies.com/WebLog/mosha Development Lead in the Analysis Server team All you need is love (John Lennon) Disclaimer : This posting is provided "AS IS" with no warranties, and confers no rights. ==================================================
I setup a system dimension that I called date. After creating a cube, I add this dimension to my project and then use the dimension usage tab to manually add the date dimension and connect it to the different dimensions of my cube.
What are the best practices for a time dimension?
Carl Perry - Microsoft
Then you should specify hierarchies. For the key it's convenient to make them char and not timestamp. Because the representation of it depends of the client application.
For example:
Tables for time dimension:
Dim_Date_STD_Year
Dim_Date_QRT_Quarter
Dim_Date_STD_Month
Dim_Date_WEK_Week
Dim_Date_STD_Day
Dim_Date_HOU_Hour
Dim_Date_HOU_Minute
With this schema you can construct any hierarchie you want.
For example:
Hierarchie: Standard (Dim_Date_STD_Year
, Dim_Date_STD_Month, Dim_Date_STD_Day)
Hierarchie: Quarter (Dim_Date_STD_Year, Dim_Date_QRT_Quarter, Dim_Date_STD_Month, Dim_Date_STD_Day)
I hope it helps you.
NitinVRaj
==================================================
Mosha Pasumansky - http://www.mosha.com/msolap
Analysis Services blog at http://www.sqljunkies.com/WebLog/mosha
Development Lead in the Analysis Server team
All you need is love (John Lennon)
Disclaimer : This posting is provided "AS IS" with no warranties, and
confers no rights.
==================================================
Frode G
I setup a system dimension that I called date. After creating a cube, I add this dimension to my project and then use the dimension usage tab to manually add the date dimension and connect it to the different dimensions of my cube.
I hope this helps,
Taylor