{"Highschooler": {"columns": [[0, "ID", "INT", 0, null, 1], [1, "name", "TEXT", 0, null, 0], [2, "grade", "INT", 0, null, 0]], "primary_keys": ["ID"], "foreign_keys": [], "unique_constraints": [[[0, 0, "ID"]]], "check_constraints": []}, "Friend": {"columns": [[0, "student_id", "INT", 0, null, 1], [1, "friend_id", "INT", 0, null, 2]], "primary_keys": ["student_id", "friend_id"], "foreign_keys": [[0, 0, "Highschooler", "friend_id", "ID", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "Highschooler", "student_id", "ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "student_id"], [1, 1, "friend_id"]]], "check_constraints": []}, "Likes": {"columns": [[0, "student_id", "INT", 0, null, 1], [1, "liked_id", "INT", 0, null, 2]], "primary_keys": ["student_id", "liked_id"], "foreign_keys": [[0, 0, "Highschooler", "student_id", "ID", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "Highschooler", "liked_id", "ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "student_id"], [1, 1, "liked_id"]]], "check_constraints": []}}
CREATE TABLE Highschooler (
    ID INT   PRIMARY KEY,
    name TEXT,
    grade INT,
    UNIQUE (ID)
);

CREATE TABLE Friend (
    student_id INT   PRIMARY KEY,
    friend_id INT   PRIMARY KEY,
    PRIMARY KEY (student_id, friend_id),
    UNIQUE (student_id, friend_id),
    FOREIGN KEY (friend_id) REFERENCES Highschooler(ID),
    FOREIGN KEY (student_id) REFERENCES Highschooler(ID)
);

CREATE TABLE Likes (
    student_id INT   PRIMARY KEY,
    liked_id INT   PRIMARY KEY,
    PRIMARY KEY (student_id, liked_id),
    UNIQUE (student_id, liked_id),
    FOREIGN KEY (student_id) REFERENCES Highschooler(ID),
    FOREIGN KEY (liked_id) REFERENCES Highschooler(ID)
);