{"airport": {"columns": [[0, "id", "INT", 0, null, 1], [1, "City", "TEXT", 0, null, 0], [2, "Country", "TEXT", 0, null, 0], [3, "IATA", "TEXT", 0, null, 0], [4, "ICAO", "TEXT", 0, null, 0], [5, "name", "TEXT", 0, null, 0]], "primary_keys": ["id"], "foreign_keys": [], "unique_constraints": [[[0, 0, "id"]]], "check_constraints": []}, "operate_company": {"columns": [[0, "id", "INT", 0, null, 1], [1, "name", "TEXT", 0, null, 0], [2, "Type", "TEXT", 0, null, 0], [3, "Principal_activities", "TEXT", 0, null, 0], [4, "Incorporated_in", "TEXT", 0, null, 0], [5, "Group_Equity_Shareholding", "REAL", 0, null, 0]], "primary_keys": ["id"], "foreign_keys": [], "unique_constraints": [[[0, 0, "id"]]], "check_constraints": []}, "flight": {"columns": [[0, "id", "INT", 0, null, 1], [1, "Vehicle_Flight_number", "TEXT", 0, null, 0], [2, "Date", "TEXT", 0, null, 0], [3, "Pilot", "TEXT", 0, null, 0], [4, "Velocity", "REAL", 0, null, 0], [5, "Altitude", "REAL", 0, null, 0], [6, "airport_id", "INT", 0, null, 0], [7, "company_id", "INT", 0, null, 0]], "primary_keys": ["id"], "foreign_keys": [[0, 0, "operate_company", "company_id", "id", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "airport", "airport_id", "id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "id"]]], "check_constraints": []}}
CREATE TABLE airport (
    id INT   PRIMARY KEY,
    City TEXT,
    Country TEXT,
    IATA TEXT,
    ICAO TEXT,
    name TEXT,
    UNIQUE (id)
);

CREATE TABLE operate_company (
    id INT   PRIMARY KEY,
    name TEXT,
    Type TEXT,
    Principal_activities TEXT,
    Incorporated_in TEXT,
    Group_Equity_Shareholding REAL,
    UNIQUE (id)
);

CREATE TABLE flight (
    id INT   PRIMARY KEY,
    Vehicle_Flight_number TEXT,
    Date TEXT,
    Pilot TEXT,
    Velocity REAL,
    Altitude REAL,
    airport_id INT,
    company_id INT,
    UNIQUE (id),
    FOREIGN KEY (company_id) REFERENCES operate_company(id),
    FOREIGN KEY (airport_id) REFERENCES airport(id)
);