Design0-Doubt
3 posters
Page 1 of 1
Design0-Doubt
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
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
RE:Design0-Doubt
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.
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
Re: Design0-Doubt
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?
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
Re: Design0-Doubt
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).
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).
Re: Design0-Doubt
Thanks ngalemmo .
I am planning to implement the second solution
implement a single fact table with two measures: estimate amount and forecast amount.
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
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|