You need to design a solution that can join a single time dimension to both fact tables

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?

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?

A.
Join the two fact tables.

B.
Merge the fact tables.

C.
Create a time dimension that can join to both fact tables at their respective granularity.

D.
Create a surrogate key for the time dimension.

Explanation:
According to these references, this answer looks correct.
References:
http://msdn.microsoft.com/en-us/library/ms174537.aspx
http://technet.microsoft.com/en-us/library/ms174832.aspx
http://msdn.microsoft.com/en-us/library/ms174884.aspx
http://decipherinfosys.wordpress.com/2007/02/01/surrogate-keys-vs-natural-keys-for-primary-key/
http://www.agiledata.org/essays/keys.html
http://www.databasejournal.com/features/mssql/article.php/3922066/SQL-Server-Natural-Key-VersesSurrogate-Key.htm
http://www.jamesserra.com/archive/2012/01/surrogate-keys/



Leave a Reply 4

Your email address will not be published. Required fields are marked *


Howie

Howie

C.
Create a time dimension that can join to both fact tables at their respective granularity.

Artur

Artur

If referential integrity must be enforced declaratively time dimension should has primary key which will be referenced by both fact tables. We can merge both fact tables and unify level of granularity to days. This would be the best solution in real life, but this is test, and we cannot assume that we have sales on a day granularity. It means that we have to create surogate key (time dimension will be on the day level) and for prapare orders facts table select surogate key by day and for prepare sales fact table select surogate key ie. as a first day of the month.
So for test purposes answer is D.

zaid

zaid

D

hamam

hamam

zaid or nag9?? lol

when u disagree with someone u should give us some references not by saying D!!