Bridge Table - What is in the Fact tbl?

View previous topic View next topic Go down

Bridge Table - What is in the Fact tbl?

Post  epekarik on Fri Jul 27, 2012 11:54 am

Hello,

I see lots of topics about populating and querying Bridge tables for Ragged Hierarchy. I'm not finding any examples of populating the fact table that shows what really is in the Fact table row. I mean real data examples, a few actual rows with key(s) clearly showing.

My measures are arriving on the lowest org level a.k.a the store level. (Some stores are directly reporting to Division, not to Region therefore we need the Bridge table because it is Ragged org hierarchy)

Company Org;
HQ
Division
Region
Store

Measures arriving;
$5 Store-1
$10 Store-2
$2 Store-3


Question:
Does the Dim_Store houses rows for the HQ and all the Divisions, and all the Regions (like they were stores)? I believe I have to add them to the Store dimension because the bridge table has their "keys" as FK
Am I correct to assume that the Fact table will NOT have rows with the Store_Key pointing to the HQ, Division or Region records in the Dim_Store table?

Thank you

Endre


Last edited by epekarik on Fri Jul 27, 2012 11:55 am; edited 1 time in total (Reason for editing : spelling error)
avatar
epekarik

Posts : 8
Join date : 2012-07-27
Age : 53
Location : Cincinnati, OH

View user profile

Back to top Go down

Re: Bridge Table - What is in the Fact tbl?

Post  LAndrews on Fri Jul 27, 2012 12:34 pm


Your example doesn't require a bridge table. A bridge table usually is required when the levels are not fixed.

Your DIM_STORE dimension could have attributes for Region, Division etc.

The grain of your fact is store... therefore the fact table will have the store_key.



LAndrews

Posts : 132
Join date : 2010-05-13
Location : British Columbia, Canada

View user profile

Back to top Go down

Re: Bridge Table - What is in the Fact tbl?

Post  epekarik on Fri Jul 27, 2012 12:52 pm

Thank you. You say that I don't need bridge table. "A bridge table usually is required when the levels are not fixed." I believe my organizational hierarchy is not fixed because a Store can be a child of any levels.
E.
avatar
epekarik

Posts : 8
Join date : 2012-07-27
Age : 53
Location : Cincinnati, OH

View user profile

Back to top Go down

Re: Bridge Table - What is in the Fact tbl?

Post  ngalemmo on Fri Jul 27, 2012 2:13 pm

epekarik wrote:

Question:
Does the Dim_Store houses rows for the HQ and all the Divisions, and all the Regions (like they were stores)? I believe I have to add them to the Store dimension because the bridge table has their "keys" as FK
Am I correct to assume that the Fact table will NOT have rows with the Store_Key pointing to the HQ, Division or Region records in the Dim_Store table?

Thank you

Endre

Rows for HQ, divisions, etc need to be in the store dimension. And yes, the fact will not have keys referencing higher levels. Just the key to store.
avatar
ngalemmo

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

View user profile http://aginity.com

Back to top Go down

Re: Bridge Table - What is in the Fact tbl?

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