Self Referencing Relationship for FACT table ?
3 posters
Page 1 of 1
Self Referencing Relationship for FACT table ?
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
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- Posts : 10
Join date : 2013-02-26
Age : 37
Re: Self Referencing Relationship for FACT table ?
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.
Re: Self Referencing Relationship for FACT table ?
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
Similar topics
» Integrating new fact table which has one to many relationship with the main fact table in existing star schema
» How to resolve a many to many relationship? Bridge Table or Utilize the same fact table?
» Fact Table - Relationship
» Relationship between fact table and dimension tables
» many to many fact table relationship - use dimension, bridge or ?
» How to resolve a many to many relationship? Bridge Table or Utilize the same fact table?
» Fact Table - Relationship
» Relationship between fact table and dimension tables
» many to many fact table relationship - use dimension, bridge or ?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum