nerdexam
Microsoft

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…

Implement and Maintain Database Objects

Question

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. You need to design a solution that can join a single time dimension to both fact tables. What should you do?

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)
  • A
    15% (6)
  • B
    2% (1)
  • C
    7% (3)
  • D
    76% (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

#data warehouse design#surrogate key#time dimension#referential integrity

Community Discussion

No community discussion yet for this question.

Full 70-458 Practice