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

Self Referencing Relationship for FACT table ?

3 posters

Go down

Self Referencing Relationship for FACT table ?  Empty Self Referencing Relationship for FACT table ?

Post  karan_das Mon Mar 04, 2013 6:14 am

Hi ,

We have a scenario where a shipment has an invoice associated with it. This is the 'Original Invoice Number' assoc with a shipment. Now, whenever there is a change in the price of the shipment, a new invoice number is being generated.
I wish to capture the new invoice number for the same shipment, but also map back to the original invoice number in a FACT table.

Is it a good practice to have a self referencing connector for a FACT table ?

Thanks,
Karan
karan_das
karan_das

Posts : 10
Join date : 2013-02-26
Age : 35

Back to top Go down

Self Referencing Relationship for FACT table ?  Empty Re: Self Referencing Relationship for FACT table ?

Post  ngalemmo Mon Mar 04, 2013 2:02 pm

You invoice shipments, you don't ship invoices. Invoice facts should reference the shipment, not the other way around. It would solve the problem you describe as it no longer matters how many times an invoice is adjusted, as they only apply to one shipment.
ngalemmo
ngalemmo

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

http://aginity.com

Back to top Go down

Self Referencing Relationship for FACT table ?  Empty Re: Self Referencing Relationship for FACT table ?

Post  hayrabedian Tue Mar 05, 2013 6:13 am

karan_das wrote:Hi ,
Is it a good practice to have a self referencing connector for a FACT table ?

Generally, it is a bad idea. Self joining a huge fact table might decrease the query performance by factors. Of course, there are exceptions ..

hayrabedian

Posts : 7
Join date : 2011-04-01

Back to top Go down

Self Referencing Relationship for FACT table ?  Empty Re: Self Referencing Relationship for FACT table ?

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