{"party": {"columns": [[0, "Party_ID", "INT", 0, null, 1], [1, "Party_Theme", "TEXT", 0, null, 0], [2, "Location", "TEXT", 0, null, 0], [3, "First_year", "TEXT", 0, null, 0], [4, "Last_year", "TEXT", 0, null, 0], [5, "Number_of_hosts", "INT", 0, null, 0]], "primary_keys": ["Party_ID"], "foreign_keys": [], "unique_constraints": [[[0, 0, "Party_ID"]]], "check_constraints": []}, "host": {"columns": [[0, "Host_ID", "INT", 0, null, 1], [1, "Name", "TEXT", 0, null, 0], [2, "Nationality", "TEXT", 0, null, 0], [3, "Age", "TEXT", 0, null, 0]], "primary_keys": ["Host_ID"], "foreign_keys": [], "unique_constraints": [[[0, 0, "Host_ID"]]], "check_constraints": []}, "party_host": {"columns": [[0, "Party_ID", "INT", 0, null, 1], [1, "Host_ID", "INT", 0, null, 2], [2, "Is_Main_in_Charge", "bool", 0, null, 0]], "primary_keys": ["Party_ID", "Host_ID"], "foreign_keys": [[0, 0, "party", "Party_ID", "Party_ID", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "host", "Host_ID", "Host_ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "Party_ID"], [1, 1, "Host_ID"]]], "check_constraints": []}}
CREATE TABLE party (
    Party_ID INT   PRIMARY KEY,
    Party_Theme TEXT,
    Location TEXT,
    First_year TEXT,
    Last_year TEXT,
    Number_of_hosts INT,
    UNIQUE (Party_ID)
);

CREATE TABLE host (
    Host_ID INT   PRIMARY KEY,
    Name TEXT,
    Nationality TEXT,
    Age TEXT,
    UNIQUE (Host_ID)
);

CREATE TABLE party_host (
    Party_ID INT   PRIMARY KEY,
    Host_ID INT   PRIMARY KEY,
    Is_Main_in_Charge bool,
    PRIMARY KEY (Party_ID, Host_ID),
    UNIQUE (Party_ID, Host_ID),
    FOREIGN KEY (Party_ID) REFERENCES party(Party_ID),
    FOREIGN KEY (Host_ID) REFERENCES host(Host_ID)
);