70-458 · Question #20
You are designing a data warehouse with two fact tables. The first table contains sales per month and the second table contains orders per day. Referential integrity must be enforced declaratively…
The correct answer is D. Create a surrogate key for the time dimension. With dimensionally modeled star schemas or snowflake schemas, decision support queries follow a typical pattern: the query selects several measures of interest from the fact table, joins the fact rows with one or several dimensions along the surrogate keys, places filter…
Question
Options
- AJoin the two fact tables.
- BMerge the fact tables.
- CCreate a time dimension that can join to both fact tables at their respective granularity.
- DCreate a surrogate key for the time dimension.
How the community answered
(41 responses)- A15% (6)
- B2% (1)
- C7% (3)
- D76% (31)
Explanation
With dimensionally modeled star schemas or snowflake schemas, decision support queries follow a typical pattern: the query selects several measures of interest from the fact table, joins the fact rows with one or several dimensions along the surrogate keys, places filter predicates on the business columns of the dimension tables, groups by one or several business columns, and aggregates the measures retrieved from the fact table over a period of time. The following demonstrates this pattern, which is also sometimes referred to as a star join query: - select ProductAlternateKey, - CalendarYear,sum(SalesAmount) - from FactInternetSales Fact - on Fact.OrderDateKey = TimeKey - join DimProduct - on DimProduct.ProductKey = - Fact.ProductKey - where CalendarYear between 2003 and 2004 - and ProductAlternateKey like 'BK%' - group by ProductAlternateKey,CalendarYear
Topics
Community Discussion
No community discussion yet for this question.