CREATE TABLE category (
name TEXT NOT NULL
);
INSERT INTO category(name) VALUES
('food')
;
CREATE TABLE item (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
category TEXT NOT NULL,
FOREIGN KEY (category) REFERENCES category(name)
);
INSERT INTO item(name, category) VALUES
('cookie', 'ololo') -- ok. no error
;