{"captain": {"columns": [[0, "Captain_ID", "INT", 0, null, 1], [1, "Name", "TEXT", 0, null, 0], [2, "Ship_ID", "INT", 0, null, 0], [3, "age", "TEXT", 0, null, 0], [4, "Class", "TEXT", 0, null, 0], [5, "Rank", "TEXT", 0, null, 0]], "primary_keys": ["Captain_ID"], "foreign_keys": [[0, 0, "Ship", "Ship_ID", "Ship_ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "Captain_ID"]]], "check_constraints": []}, "Ship": {"columns": [[0, "Ship_ID", "INT", 0, null, 1], [1, "Name", "TEXT", 0, null, 0], [2, "Type", "TEXT", 0, null, 0], [3, "Built_Year", "REAL", 0, null, 0], [4, "Class", "TEXT", 0, null, 0], [5, "Flag", "TEXT", 0, null, 0]], "primary_keys": ["Ship_ID"], "foreign_keys": [], "unique_constraints": [[[0, 0, "Ship_ID"]]], "check_constraints": []}}
CREATE TABLE captain (
    Captain_ID INT   PRIMARY KEY,
    Name TEXT,
    Ship_ID INT,
    age TEXT,
    Class TEXT,
    Rank TEXT,
    UNIQUE (Captain_ID),
    FOREIGN KEY (Ship_ID) REFERENCES Ship(Ship_ID)
);

CREATE TABLE Ship (
    Ship_ID INT   PRIMARY KEY,
    Name TEXT,
    Type TEXT,
    Built_Year REAL,
    Class TEXT,
    Flag TEXT,
    UNIQUE (Ship_ID)
);