Forum Discussion

lucasiragusa's avatar
lucasiragusa
Frequent Visitor
7 years ago
Solved

Connecting two columns in one table with one reference table without duplication

Dear community,

 

I am trying to create a relationship between two columns in a table (call it "Flight information") that has flight schedule information and a table that contains details on origin and destination airports (call it "Airport information"). I want to link both origin and destination airport code to the same unique key in the table that contains airport details.

 

What is the recommended practice in this case? My problems are:
- If I manually connect both codes from "Flight information" to "Airport information", I have to make one relationship inactive;
- Furthermore, if I manually connect as described in the point above, I will be unable to pick the right detail from the "Airport information" table for use in the dashboard (ie I won't be able to distinguish whether I want the details to show for origin or destination airport).

 

One way around this problem would be to duplicate the "Airport information" table into "Origin Airport information" and "Destination Airport Information". However, wouldn't this be an inefficient duplication of data?

 

Thanks in advance for your help, 

Luca

  • LivioLanzo's avatar
    LivioLanzo
    7 years ago

    Hi lucasiragusa

     

    in this case I would duplicate the Airport Information table and connect one to the FROM and on to the TO

     

    should not be a problem for a dimension table

3 Replies

    • lucasiragusa's avatar
      lucasiragusa
      Frequent Visitor

      Hi LivioLanzo,

       

       

      The attached is a simplified example. I want to use the IATA code of the airport to retrieve info like name of the airport, latitude and longitude etc. 

       

       

      airport code to access 

      • LivioLanzo's avatar
        LivioLanzo
        Solution Sage

        Hi lucasiragusa

         

        in this case I would duplicate the Airport Information table and connect one to the FROM and on to the TO

         

        should not be a problem for a dimension table