Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Dimension key in a fact table should be repetitive? Expand / Collapse
Author
Message
Posted Tuesday, October 8, 2013 12:30 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, November 11, 2013 3:09 AM
Points: 11, Visits: 97
We do have one to one relationship between a FACT table and Dimension table? Is it correct to have this kind of dimensional model.
Post #1502469
Posted Tuesday, October 8, 2013 1:35 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 11:42 AM
Points: 13,295, Visits: 11,086
Normally relationships between fact and dimension are 1 to many, eg 1 dimension key can appear multiple times in the fact table.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1502485
Posted Tuesday, October 8, 2013 3:48 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, November 11, 2013 3:09 AM
Points: 11, Visits: 97
We do have a reqirement to design a OLAP model for consolidating the issues identified on ASSETS from various sources\system.

Let us take one sample record;

Issue | Asset | Status |Priority |St_DT |End_Dt | Brief Description | Owner | location | Source
ISS1 | ASS1,ASS2 |Open |High |1-Jan-13 |NULL | issue description | scott | CA | SRC1

We have designed the below model for this scenario:

Dimension_Asset: Conformed dimesion for assets.

Dimension_Asset_Group: Since each issue can have multiple assets we have designed a group table.

Dimension_Date: Conformed and role playing dimension for start and end date

Dimension_Issue: Issue_ID,Owner,Location,Brief Description,Source

Fact_Issue: Issue_ID,Asset_Group_ID,Status,Priority,St_DT,End_DT



Actually issues will be associated with many deatiled text and attributes. Do we need to capture this information in the FACT_ISSUE table or dimension_issue table. Dimension_Issue (though we cannot call it as dimension since its not repitative data in the fact table), is more like details of the fact table.

Post #1502515
Posted Tuesday, October 8, 2013 3:49 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, November 11, 2013 3:09 AM
Points: 11, Visits: 97
In the above model dimension_issue and fact_issue is have 0ne to One relationship; Is it correct to have this kind of model?
Post #1502516
Posted Tuesday, October 8, 2013 9:58 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Today @ 7:23 AM
Points: 67, Visits: 709
You can have a 1 to 1 relationship between a dimension and a fact table, you often see this in a degenerate dimension.

You write “Actually issues will be associated with many deatiled text and attributes”, that is many to one between text and issue. Sounds like you need a bridge table or issue is not the grain in your fact table.
Post #1502694
Posted Tuesday, October 8, 2013 12:20 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 11:42 AM
Points: 13,295, Visits: 11,086
Since you have 1 fact for each issue (I guess the only measure is a count?), it is possible to have a 1 to 1 relationship.
Personally I would store status and priority in dimensions. Text attributes do not really belong in a fact table.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1502758
Posted Wednesday, October 9, 2013 1:37 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, November 11, 2013 3:09 AM
Points: 11, Visits: 97
Many thanks for the replies

Even i am interested to have status and priority as dimensions, but does it have any impact on ETL layer.

Also the status and priority table would be having very minimal data.
Post #1502945
Posted Wednesday, October 9, 2013 1:50 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 11:42 AM
Points: 13,295, Visits: 11,086
manickam (10/9/2013)

Even i am interested to have status and priority as dimensions, but does it have any impact on ETL layer.

Also the status and priority table would be having very minimal data.


Sure it impacts the ETL layer. You'd have to write code to maintain those dimensions.
It doesn't matter if they contain minimal data, the point is to normalize your fact table. You need to make your fact table as small as possible, because this table will contain the most rows.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1502948
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse