Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Design a fact_table as dimension

Hi,

 

in the case we have an OrderDetail table and an OrderHeader table which relate:

 

OrderDetail n:1 OrderHeader

 

One OrderHeader can have multiple OrderDetails, but one OrderDetail can only have one OrderHeader. 

 

Can I design that OrderHeader table as a dimension table for describing the fact_OrderDetail? 

 

Technically this dim_OrderHeader is a fact table, because there are a lot of inserts, everytime an Order gets placed, or am I wrong? 

3 Replies

  • Anonymous , Order header can be used as a dimension. But order details fact need to merged copy of header and details with all dimension key from both tables copied to this fact.

    • Anonymous's avatar
      Anonymous
      Not applicable

      amitchandak  What? I just want to use the OrderDetails as fact and store the dim_OrderHeader_id in it and join with that to the dim_OrderHeader, because that is the unique identifier.