Tariff dimension
3 posters
Page 1 of 1
Tariff dimension
Hi
I need some urgent help on modeling a dimension the scenario is as follows:
I have an orderline table e.g.
Date | productcode | quantity
2012-01-01 | a0123 | 2
i have a tariff table like
productcode | dept | tariff
a0123 | A | 2.00
a0123 | B | 0.75
a0123 | C | 1.25
for each product sold every department will get the specified amount of money.
I want to design the fact and dimension for this scenario one approach is to explode the fact table so for each orderline there will be three fact records, as the fact table is very big it will take a lot of time and it will also increase the quantity three times. the second approach is to pivot the dimesnion assign 1 product key to each line and use 1 revenue meausre for each department. As the number of departments is not fixed for all the products and there is possibility that they will grow which will require changing the fact table everytime, also not very convinient.
Can some one please guide me what would be the good design in this scenario.
p.s. the table insertion in the post is not working for me so i use pipe '|' character for column delimiter
Regards
Harris
I need some urgent help on modeling a dimension the scenario is as follows:
I have an orderline table e.g.
Date | productcode | quantity
2012-01-01 | a0123 | 2
i have a tariff table like
productcode | dept | tariff
a0123 | A | 2.00
a0123 | B | 0.75
a0123 | C | 1.25
for each product sold every department will get the specified amount of money.
I want to design the fact and dimension for this scenario one approach is to explode the fact table so for each orderline there will be three fact records, as the fact table is very big it will take a lot of time and it will also increase the quantity three times. the second approach is to pivot the dimesnion assign 1 product key to each line and use 1 revenue meausre for each department. As the number of departments is not fixed for all the products and there is possibility that they will grow which will require changing the fact table everytime, also not very convinient.
Can some one please guide me what would be the good design in this scenario.
p.s. the table insertion in the post is not working for me so i use pipe '|' character for column delimiter
Regards
Harris
grahan007- Posts : 18
Join date : 2009-05-26
Re: Tariff dimension
Go wide on the fact table, not deep.
BoxesAndLines- Posts : 1212
Join date : 2009-02-03
Location : USA
Re: Tariff dimension
A third approach is to use a bridge table with the allocation amount. The fact table remains small and simple and you can report by department any time you want.
Re: Tariff dimension
ngalemmo wrote:A third approach is to use a bridge table with the allocation amount. The fact table remains small and simple and you can report by department any time you want.
you mean to say i should create fact_tariff and link it to fact_order via bridge table some thing like
fact_tariff ---> Bridge table <----fact_order
Am I right?
Regards
Harris
grahan007- Posts : 18
Join date : 2009-05-26
Re: Tariff dimension
The tariff table is a bridge: product key, department key, and tariff. Join product from fact to bridge, and department from bridge to dimension. Quantity * tariff, group by department...
Similar topics
» bridge table and junk dimension on customer dimension (bank/credit union)
» Modeling an Employee Dimension to a Fact which has two columns relating to the Dimension
» How to handle a Type I or II dimension with a snowflaked customer sub dimension (kimball book page 337, 338)
» modelling Product dimension for Pizza outlet
» Using the Date Dimension for Summary Fact Tables or new specialized Month Dimension?
» Modeling an Employee Dimension to a Fact which has two columns relating to the Dimension
» How to handle a Type I or II dimension with a snowflaked customer sub dimension (kimball book page 337, 338)
» modelling Product dimension for Pizza outlet
» Using the Date Dimension for Summary Fact Tables or new specialized Month Dimension?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|