Fact Table Foreign Key reference question

View previous topic View next topic Go down

Fact Table Foreign Key reference question

Post  mru22 on Wed Aug 10, 2011 4:45 pm

I have a fact table Called "Injury" I have now had to bring in additional data which includes body part and nature of the injury information related to the injury.

So and Injury can have 0,1 or more body parts. I originally was going to make a table called BodyPartInjuryNature have a foreign key from the Injury Fact table. Is that the correct way or would there be a better option for design ?

Thank you,


mru22

Posts : 34
Join date : 2011-06-14

View user profile

Back to top Go down

Re: Fact Table Foreign Key reference question

Post  hang on Sat Aug 13, 2011 5:38 pm

I don't think you can have body parts FK in the injury fact table which is at injury level and body part is a multivalued dimension. I would create a bridge table that holds both FKs so that you are able to drill down from injury to body parts

hang

Posts : 528
Join date : 2010-05-07
Location : Brisbane, Australia

View user profile

Back to top Go down

Re: Fact Table Foreign Key reference question

Post  cjrinpdx on Mon Aug 15, 2011 3:10 pm

The grain is different. Your current fact table "Injury" is one row per injury. Your new fact table would be one row per injury and body part. Your new fact table could be a factless fact table where you just pull in the related dimensions (body part, person, injury nature).

cjrinpdx

Posts : 51
Join date : 2011-07-14
Location : Portland, OR

View user profile

Back to top Go down

Re: Fact Table Foreign Key reference question

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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