Trees: a table that points at itself

Categories inside categories: the parent_id that builds a tree, the recursive query that walks it, and the loop that every foreign key lets through.

Checking your access…