Solved

Join Two fact tables that has different grain

Posted on 2007-12-02
2
1,314 Views
Last Modified: 2008-03-04
I have two fact tables that share the same dimension (consumer) but have different grains ..

Fact A:

Consumer_key, Episode_key, Episode_Begin_date_key,assessment_key

Fact B:
Consumer_key, Episode_key, Service_begin_date_key, Sum_of_Cost



There is 1:M relationshiop between Fact A and Fact B...

IS it a bad idea to join two fact tables to get a result ?
DO I have to always use a common dimension table , in this case, DimConsumer to join to fact tables?

0
Comment
Question by:jung1975
2 Comments
 
LVL 25

Accepted Solution

by:
imitchie earned 250 total points
ID: 20391999
If some cases you have to join them together, then there's no other choice so there's no good/bad idea. However, you should reconsider alternate routes to arrive at your facts, possibly Fact C, if performance becomes an issue.
For joining, yes you do need a common dimension table.
0
 
LVL 5

Assisted Solution

by:nicolasdiogo
nicolasdiogo earned 250 total points
ID: 20396038
i suppose i will have to say depends, you could use the more detailed fact to support deeper business investigations.

if you want to allow users to check customers' assessments using FACT A  and then drill through into FACT B on a second report would make sense and keep performance good.

BUT you could also amalgamate both FACTs into a single table if performance becomes an issue.

AND you will always need shared dimensions to be able to bridge between fact tables to make them work properly.


0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you use NetMotion Mobility on your PC and plan to upgrade to Windows 10, it may not work unless you take these steps.
How to set-up an On Demand, IPSec, Site to SIte, VPN from a Draytek Vigor Router to a Cyberoam UTM Appliance. A concise guide to the settings required on both devices
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question