Narrowing the fact table ... or not?
2 posters
Page 1 of 1
Narrowing the fact table ... or not?
I am modeling a fact table that has transaction line item grain. The business driver for the project is to allow fact history tracking. The facts are about bookings (pre-sales). Unlike real, invoiced transactions, any booking attribute including keys and qty can change (e.g. customer calls and changes ProductA qty3 with ProductB qty5 and src. system just updates the booking order). Again, no aggregates in fact, analytical performance is not the main priority, history is.
(Dimensional history is done with SCD2 and fact history is calculated with qty deltas and reversals in ETL - it is not relevant, just to explain the business driver)
The dilemma is around accommodating some 100+ factual attributes (text notes, details of Product customization, ship-to address, delivery terms, etc) that don't seem fit into other dimensions .
My temptation is to call these attributes a degenerate dim and to host them in the fact where they logically belong. From a modeling perspective though, it is a bad practice, but mainly for performance reasons. On the other hand, transactional reporting doesn’t need to retrieve massive amount of data to be concern about the disk reads.
Given the mission goals (history tracking, transactional reporting) should I worry about the width of the fact table and create a separate Booking_Line_Item_Dim(1:1) to unload the attributes from the fact or is it still acceptable to have them in a fat fact table?
(Dimensional history is done with SCD2 and fact history is calculated with qty deltas and reversals in ETL - it is not relevant, just to explain the business driver)
The dilemma is around accommodating some 100+ factual attributes (text notes, details of Product customization, ship-to address, delivery terms, etc) that don't seem fit into other dimensions .
My temptation is to call these attributes a degenerate dim and to host them in the fact where they logically belong. From a modeling perspective though, it is a bad practice, but mainly for performance reasons. On the other hand, transactional reporting doesn’t need to retrieve massive amount of data to be concern about the disk reads.
Given the mission goals (history tracking, transactional reporting) should I worry about the width of the fact table and create a separate Booking_Line_Item_Dim(1:1) to unload the attributes from the fact or is it still acceptable to have them in a fat fact table?
antonkov- Posts : 5
Join date : 2012-06-18
Re: Narrowing the fact table ... or not?
I would break up the 100 plus attributes into multiple Junk or mini dimensions. Having the 100 plus attributes in a dimension table that is 1:1 with the fact doesn't get you anything.
Jeff Smith- Posts : 471
Join date : 2009-02-03
Re: Narrowing the fact table ... or not?
Having the attributes in a separate table, even if it is in 1:1 to the fact, makes the fact records physically smaller, which should translate into faster reads and better performance. On the ETL side though, it translates into extra table to maintain in parallel with the fact.
If I spin out more dimensions that are not business driven, I will still have smaller fact records, but more joins and more complex ETL. On the positive side, I will comply with best practices and get an extra performance that I am not really concerned about. Hard to decide.
If I spin out more dimensions that are not business driven, I will still have smaller fact records, but more joins and more complex ETL. On the positive side, I will comply with best practices and get an extra performance that I am not really concerned about. Hard to decide.
antonkov- Posts : 5
Join date : 2012-06-18
Re: Narrowing the fact table ... or not?
No one ever got fired for using best practices.
Jeff Smith- Posts : 471
Join date : 2009-02-03
Similar topics
» 'Routing' the grain of the fact table to multpile members of multiple dimensions causes the fact table to 'explode'
» Integrating new fact table which has one to many relationship with the main fact table in existing star schema
» How to create fact table with measures derived from comparing two fact table rows
» Healthcare Hospital Stay fact table - transaction fact table - a row for In and a row for Out?
» Design a snapshot Fact table in data mart from compliance-enable fact table in enterprise data warehouse
» Integrating new fact table which has one to many relationship with the main fact table in existing star schema
» How to create fact table with measures derived from comparing two fact table rows
» Healthcare Hospital Stay fact table - transaction fact table - a row for In and a row for Out?
» Design a snapshot Fact table in data mart from compliance-enable fact table in enterprise data warehouse
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum