CREATE TABLE artist (
    id integer NOT NULL CONSTRAINT artist_pk PRIMARY KEY AUTOINCREMENT,
    name text NOT NULL
);

CREATE TABLE links (
    id integer NOT NULL CONSTRAINT links_pk PRIMARY KEY AUTOINCREMENT,
    url text NOT NULL,
    website_id integer NOT NULL,
    artist_id integer NOT NULL,
    CONSTRAINT links_artist FOREIGN KEY (artist_id)
    REFERENCES artist (id),
    CONSTRAINT links_website FOREIGN KEY (website_id)
    REFERENCES website (id)
);

CREATE TABLE website (
    id integer NOT NULL CONSTRAINT website_pk PRIMARY KEY AUTOINCREMENT,
    name text NOT NULL
);
