Create categories with cat_id INTEGER PRIMARY KEY, name VARCHAR NOT NULL and parent_id pointing to another category (NULL for top level). A category can't be its own parent.
This question starts with an empty database.
Each hint gives a little more help. Try on your own first.
Run your code to see the output here.