Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

two both direction between two fact table and two dimension table

There are two dimension tables dim1,dim2, and two fact tables fact1,fact2

the model is dim1 has 1-n relation fact1 and fact2 with column col1,

and dim2 has 1-n relation fact1 and fact2 with column col2

now dim1 has both direction with fact1, is it available that  dim2 has both direction with fact1?

I tried but it seems unable to create two both direction and want to know if I have some mistake, Thank you.

 

  • Anonymous , if you have two facts and two dimensions, You can not have all bi-directional relationships. As it creates loops or multiple paths. Keep one of the dims in a single direction.

    Bi-Directional joins are also not recommended because of performance reasons.

  • Anonymous , I think with one fact you should be able to do. The thing is that there should not be two paths or loops.

    Say A- Fact - C

    A- Fact2 - C

     

    When it is bi-direction you have two paths

    A- Fact - C - Fact2

    A- Fact2

3 Replies

  • Anonymous , if you have two facts and two dimensions, You can not have all bi-directional relationships. As it creates loops or multiple paths. Keep one of the dims in a single direction.

    Bi-Directional joins are also not recommended because of performance reasons.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Is it availble that all dimension tables has bi-directional relationship to only one fact table?

      • amitchandak's avatar
        amitchandak
        Icon for Super User rankSuper User

        Anonymous , I think with one fact you should be able to do. The thing is that there should not be two paths or loops.

        Say A- Fact - C

        A- Fact2 - C

         

        When it is bi-direction you have two paths

        A- Fact - C - Fact2

        A- Fact2