{"Person": {"columns": [[0, "name", "varchar(20)", 0, null, 1], [1, "age", "INTEGER", 0, null, 0], [2, "city", "TEXT", 0, null, 0], [3, "gender", "TEXT", 0, null, 0], [4, "job", "TEXT", 0, null, 0]], "primary_keys": ["name"], "foreign_keys": [], "unique_constraints": [[[0, 0, "name"]]], "check_constraints": []}, "PersonFriend": {"columns": [[0, "name", "varchar(20)", 0, null, 0], [1, "friend", "varchar(20)", 0, null, 0], [2, "year", "INTEGER", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "Person", "friend", "name", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "Person", "name", "name", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}}
CREATE TABLE Person (
    name varchar(20)   PRIMARY KEY,
    age INTEGER,
    city TEXT,
    gender TEXT,
    job TEXT,
    UNIQUE (name)
);

CREATE TABLE PersonFriend (
    name varchar(20),
    friend varchar(20),
    year INTEGER,
    FOREIGN KEY (friend) REFERENCES Person(name),
    FOREIGN KEY (name) REFERENCES Person(name)
);