{"member": {"columns": [[0, "Member_ID", "TEXT", 0, null, 1], [1, "Name", "TEXT", 0, null, 0], [2, "Nationality", "TEXT", 0, null, 0], [3, "Role", "TEXT", 0, null, 0]], "primary_keys": ["Member_ID"], "foreign_keys": [], "unique_constraints": [[[0, 0, "Member_ID"]]], "check_constraints": []}, "performance": {"columns": [[0, "Performance_ID", "REAL", 0, null, 1], [1, "Date", "TEXT", 0, null, 0], [2, "Host", "TEXT", 0, null, 0], [3, "Location", "TEXT", 0, null, 0], [4, "Attendance", "INT", 0, null, 0]], "primary_keys": ["Performance_ID"], "foreign_keys": [], "unique_constraints": [[[0, 0, "Performance_ID"]]], "check_constraints": []}, "member_attendance": {"columns": [[0, "Member_ID", "INT", 0, null, 1], [1, "Performance_ID", "INT", 0, null, 2], [2, "Num_of_Pieces", "INT", 0, null, 0]], "primary_keys": ["Member_ID", "Performance_ID"], "foreign_keys": [[0, 0, "performance", "Performance_ID", "Performance_ID", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "member", "Member_ID", "Member_ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "Member_ID"], [1, 1, "Performance_ID"]]], "check_constraints": []}}
CREATE TABLE member (
    Member_ID TEXT   PRIMARY KEY,
    Name TEXT,
    Nationality TEXT,
    Role TEXT,
    UNIQUE (Member_ID)
);

CREATE TABLE performance (
    Performance_ID REAL   PRIMARY KEY,
    Date TEXT,
    Host TEXT,
    Location TEXT,
    Attendance INT,
    UNIQUE (Performance_ID)
);

CREATE TABLE member_attendance (
    Member_ID INT   PRIMARY KEY,
    Performance_ID INT   PRIMARY KEY,
    Num_of_Pieces INT,
    PRIMARY KEY (Member_ID, Performance_ID),
    UNIQUE (Member_ID, Performance_ID),
    FOREIGN KEY (Performance_ID) REFERENCES performance(Performance_ID),
    FOREIGN KEY (Member_ID) REFERENCES member(Member_ID)
);