How to populate a table's foreign keys from other tables?
Do you already have all the Airports?  Some of them?  None of them?  The details depend on which case you are doing.

Two steps (per normalization table):  INSERT...SELECT DISTINCT ... LEFT JOIN .. WHERE .. IS NULL to add to normalization table.  Then UPDATE ... SELECT ... JOIN... to get the ids back.

The code here is aimed at the "some of them" case, bu probably works for all 3 cases.

If you actually have FOREIGN KEY constraints enabled, be careful of the order of performing operations -- else you could get errors.