{"flight": {"columns": [[0, "flno", "number(4,0)", 0, null, 1], [1, "origin", "varchar2(20)", 0, null, 0], [2, "destination", "varchar2(20)", 0, null, 0], [3, "distance", "number(6,0)", 0, null, 0], [4, "departure_date", "date", 0, null, 0], [5, "arrival_date", "date", 0, null, 0], [6, "price", "number(7,2)", 0, null, 0], [7, "aid", "number(9,0)", 0, null, 0]], "primary_keys": ["flno"], "foreign_keys": [[0, 0, "aircraft", "aid", "aid", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "flno"]]], "check_constraints": []}, "aircraft": {"columns": [[0, "aid", "number(9,0)", 0, null, 1], [1, "name", "varchar2(30)", 0, null, 0], [2, "distance", "number(6,0)", 0, null, 0]], "primary_keys": ["aid"], "foreign_keys": [], "unique_constraints": [[[0, 0, "aid"]]], "check_constraints": []}, "employee": {"columns": [[0, "eid", "number(9,0)", 0, null, 1], [1, "name", "varchar2(30)", 0, null, 0], [2, "salary", "number(10,2)", 0, null, 0]], "primary_keys": ["eid"], "foreign_keys": [], "unique_constraints": [[[0, 0, "eid"]]], "check_constraints": []}, "certificate": {"columns": [[0, "eid", "number(9,0)", 0, null, 1], [1, "aid", "number(9,0)", 0, null, 2]], "primary_keys": ["eid", "aid"], "foreign_keys": [[0, 0, "aircraft", "aid", "aid", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "employee", "eid", "eid", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "eid"], [1, 1, "aid"]]], "check_constraints": []}}
CREATE TABLE flight (
    flno number(4,0)   PRIMARY KEY,
    origin varchar2(20),
    destination varchar2(20),
    distance number(6,0),
    departure_date date,
    arrival_date date,
    price number(7,2),
    aid number(9,0),
    UNIQUE (flno),
    FOREIGN KEY (aid) REFERENCES aircraft(aid)
);

CREATE TABLE aircraft (
    aid number(9,0)   PRIMARY KEY,
    name varchar2(30),
    distance number(6,0),
    UNIQUE (aid)
);

CREATE TABLE employee (
    eid number(9,0)   PRIMARY KEY,
    name varchar2(30),
    salary number(10,2),
    UNIQUE (eid)
);

CREATE TABLE certificate (
    eid number(9,0)   PRIMARY KEY,
    aid number(9,0)   PRIMARY KEY,
    PRIMARY KEY (eid, aid),
    UNIQUE (eid, aid),
    FOREIGN KEY (aid) REFERENCES aircraft(aid),
    FOREIGN KEY (eid) REFERENCES employee(eid)
);