I have a "categories" table that has a structure:
- categoryId
- parentId
- categoryName
This table represents categorized tree structure where parentId is actually a pointer to categoryId.
Is it possible to put a foreign key RESTRICT to parentId which points to categoryId so that I disable deletion of children nodes?