{"people": {"columns": [[0, "People_ID", "INT", 0, null, 1], [1, "District", "TEXT", 0, null, 0], [2, "Name", "TEXT", 0, null, 0], [3, "Party", "TEXT", 0, null, 0], [4, "Age", "INT", 0, null, 0]], "primary_keys": ["People_ID"], "foreign_keys": [], "unique_constraints": [[[0, 0, "People_ID"]]], "check_constraints": []}, "debate": {"columns": [[0, "Debate_ID", "INT", 0, null, 1], [1, "Date", "TEXT", 0, null, 0], [2, "Venue", "TEXT", 0, null, 0], [3, "Num_of_Audience", "INT", 0, null, 0]], "primary_keys": ["Debate_ID"], "foreign_keys": [], "unique_constraints": [[[0, 0, "Debate_ID"]]], "check_constraints": []}, "debate_people": {"columns": [[0, "Debate_ID", "INT", 0, null, 1], [1, "Affirmative", "INT", 0, null, 2], [2, "Negative", "INT", 0, null, 3], [3, "If_Affirmative_Win", "bool", 0, null, 0]], "primary_keys": ["Debate_ID", "Affirmative", "Negative"], "foreign_keys": [[0, 0, "people", "Negative", "People_ID", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "people", "Affirmative", "People_ID", "NO ACTION", "NO ACTION", "NONE"], [2, 0, "debate", "Debate_ID", "Debate_ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "Debate_ID"], [1, 1, "Affirmative"], [2, 2, "Negative"]]], "check_constraints": []}}
CREATE TABLE people (
    People_ID INT   PRIMARY KEY,
    District TEXT,
    Name TEXT,
    Party TEXT,
    Age INT,
    UNIQUE (People_ID)
);

CREATE TABLE debate (
    Debate_ID INT   PRIMARY KEY,
    Date TEXT,
    Venue TEXT,
    Num_of_Audience INT,
    UNIQUE (Debate_ID)
);

CREATE TABLE debate_people (
    Debate_ID INT   PRIMARY KEY,
    Affirmative INT   PRIMARY KEY,
    Negative INT   PRIMARY KEY,
    If_Affirmative_Win bool,
    PRIMARY KEY (Debate_ID, Affirmative, Negative),
    UNIQUE (Debate_ID, Affirmative, Negative),
    FOREIGN KEY (Negative) REFERENCES people(People_ID),
    FOREIGN KEY (Affirmative) REFERENCES people(People_ID),
    FOREIGN KEY (Debate_ID) REFERENCES debate(Debate_ID)
);