https://github.com/sequelize/cli/blob/main/docs/FAQ.md //
same airplane but difference flights.
- Airplane Table
- Flight
- Airport
- City
- Id
- Model_number
- capacity
- created_at
- updated_at
- id
- airport_id
- src_airport_id
- dest_airport_id
- departure_date
- arrival_date
- departure_time
- arrival_time
- id
- name
- id
- name
- city_id
- address
- 1:N on airplane to Flights
- 1:N City to Airport (In one city might be have many airport).
- 1:N Airport to Flight.
- id - unique id to identify the flights
Relationship -> City has many airports and Airport belongs to a city(one to many)
join query :-
select * from Airports Join Cities on Airports.cityId = Cities.id where Cities.id = 8;