function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Long Nguyen 19Long Nguyen 19 

Issue about designing database diagram

Hi Experts,

I am having one issue that still not find the way to fix. I have a table airport has 2 colums: airportcode(PK), airportname . Another table is flight which has 3 columns: flightcode(PK), origin, destination.
airport has one to many relationship with flight ---> 1-n . But flight table has origin and destination which are linked to airport.
So what kind of this relationship between flight and airport? can anyone advise me about this?
Mudasir WaniMudasir Wani
Hi Long Nguyen,

I will suggest you to create the following Objects(tables)

1. Airports
2. Terminals(You can use picklist on airports but I will go for object for this requirement)-You may need reports later
3. Flights(Airlines)
4. Destinations

Relationships 
Airports - Terminals (1 : N)
Airports - Flights(Many to many)
Flights - Destinations(1 : N)

You can add different Objects as per your requirement.


Please mark this as solution if this solves your problem, So that if anyone has this issue this post can help