Quantcast
Channel: SQLServerCentral » Data Warehousing » Analysis Services » Latest topics
Viewing all articles
Browse latest Browse all 1341

Combining a static dimension with a "child" dimension

$
0
0
I have a dimension that represents a hierarchy that will change less often.I have a fact table and a dimension at the same granularity. The dimension in this case is needed to relate two fact tables together that are different granularities.I'm going to use a baseball example to illustrate this scenario since some of my business entities are a little abstract.TeamDim:TeamDimIdTeamNameManagerNameHomeStadiumNamePrimarySponsorNameOwningCompanyName-- Let's assume we are only analyzing games "our" teams participate in, so we don't relate to two teams, just one TeamDimId to simplify the exampleGameFact:GameFactIdGameDimIdTeamDimIdGameDurationSecondsGameInningDim (one row per inning):GameDimIdInningIdGameDate -- DateDim related to GameFact via indirect relationshipBatterSwingFact:BatterSwingFactIdTeamDimIdInningIdSwingResultDimId -- Dimension has attributes for whether they swung and whether they hit/stroke/foul: "Swung, Strike", "Swung, Hit, Ground", "Swung, Hit, Foul", "Swung, Hit, Homerun"Note: BatterSwingFact is related to GameInningDim at the Inning granularity, and GameFact is related at the Game granularity. I have these facts setup to not aggregate with unrelated dimensions. This ensures I can add facts to a pivot report, and the GameFact measures will only show up in subtotals outside the context of dimensions such as SwingResultDim that it is unrelated to. This way someone could have a report that includes facts from both fact tables(which is a requirement) but only see aggregations at the appropriate granularities.Here's my question:[b]Should I combine TeamDim with GameInningDim?[/b] TeamDim is a dimension that rarely changes, and GameInningDim changes often.My intuition was originally they should be separate. There's nothing really stopping me from combining them though. There's a clear hierarchy that a game is a child of a Team(in our simplified scenario where the game "belongs" only to one team), and an inning a child of a game. It just seems overboard to denormalize to that extent, but that might be the OLTP DB designer in me fighting that.Opinions?

Viewing all articles
Browse latest Browse all 1341

Trending Articles