Kimball Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Design0-Doubt

3 posters

Go down

Design0-Doubt Empty Design0-Doubt

Post  SathyJaanu Wed Oct 28, 2015 10:04 am

If i have two tables that have same columns but they have different data in them.Should  i have a one Dimension table and a fact table for each of the table
or join them into a single fact and Dimension table.

Below is just an example of table

ProjectEstimates:

ProjectNumber   Month Year Amount
1    January  2015 100$
1    February 2015 200$
1    January  2016  50$
2    January  2015  400$
------------------------- and so on

ProjectForeCast:

ProjectNumber   Month Year Amount
1    March     2017 100$
1    February 2017 200$
1    January  2016  50$
2    January  2016  400$
------------------------- and so on

SathyJaanu

Posts : 20
Join date : 2015-10-07

Back to top Go down

Design0-Doubt Empty RE:Design0-Doubt

Post  zoom Wed Oct 28, 2015 12:28 pm

You can have one dim table to store Project Estimates attributes and project costs attribute, but you need to create a column that distinguish that data. A dim which has different types of correlated data is called a role playing dim. Here is more detail...

A single physical dimension can be referenced multiple times in a fact table, with each reference linking to a logically distinct role for the dimension. For instance, a fact table can have several dates, each of which is represented by a foreign key to the date dimension. It is essential that each foreign key refers to a separate view of the date dimension so that the references are independent. These separate dimension views (with unique attribute column names) are called roles.

zoom

Posts : 97
Join date : 2010-08-23
Location : Chicago

Back to top Go down

Design0-Doubt Empty Re: Design0-Doubt

Post  SathyJaanu Wed Oct 28, 2015 2:46 pm

i am sorry couldnt follow u.
Is it like a column in DImensional table that distinguishes data from ProjectEstimates,ProjectForeCast

how would i refer that in a fact table?

SathyJaanu

Posts : 20
Join date : 2015-10-07

Back to top Go down

Design0-Doubt Empty Re: Design0-Doubt

Post  ngalemmo Wed Oct 28, 2015 4:17 pm

The nature of the measures is implied in the fact table. It is not a dimension.

The ProjectEstimate fact contains estimates and the ProjectForecast fact contains forecasts.

Alternately you could implement a single fact table with two measures: estimate amount and forecast amount.

Your dimensions would be project and month (the month dimension would contain rows for each month in each year).
ngalemmo
ngalemmo

Posts : 3000
Join date : 2009-05-15
Location : Los Angeles

http://aginity.com

Back to top Go down

Design0-Doubt Empty Re: Design0-Doubt

Post  SathyJaanu Thu Oct 29, 2015 9:43 am

Thanks ngalemmo .

I am planning to implement the second solution

implement a single fact table with two measures: estimate amount and forecast amount.

SathyJaanu

Posts : 20
Join date : 2015-10-07

Back to top Go down

Design0-Doubt Empty Re: Design0-Doubt

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum