70 likes | 231 Views
School of Information and Communication Technology. Royal Institute of Technology Stockholm, Sweden. Ralph Kimball, Kimball Group, Number 51, February 1 2004. Latest thinking on Time Dimension Tables. Calendar Date Dimension. Most common and useful time dimension
E N D
School of Information and Communication Technology Royal Institute of TechnologyStockholm, Sweden
Ralph Kimball, Kimball Group, Number 51, February 1 2004 Latest thinking on Time Dimension Tables
Calendar Date Dimension • Most common and useful time dimension • Completely specified at the beginning • Attributes • Generated directly: month name, year, etc. • Embedded: holidays, fiscal periods, etc. • Date Type, Full Date • Surrogate vs. smart keys
Date Type, Full Date • “NA”, null • … • “date”, 20081125 • “date”, 20081126 • “date”, 20081127 • …
Surrogate vs. smart keys • Surrogate Keys • 1, “NA”, null • … • 329, “date”, 20081125 • 330, “date”, 20081126 • 331, “date”, 20081127 • … • * assuming we count 2008 onwards
Surrogate vs. smart keys • Smart Keys • 99999999, “NA”, null • … • 20081125, “date”, 20081125 • 20081126, “date”, 20081126 • 20081127, “date”, 20081127 • …
Time of day • Previous approach • Date Dimension (year, month, week, day, etc.) • Time Dimension (hour, minutes, seconds, etc.) • Time of day • Time-of-day Dimension(minutes or seconds past midnight) • New approach • Date Dimension • New Fact – SQL Date Timestamp • Time-of-day Dimension (optional)