I need a little of help. This is my design to organize several categories.
Category 1
Sub Category 1.1
Sub Category 1.1.1
Sub Category 1.
You'd have a table something like this:
Then, if a category has a parent, you reference the id of that other row. So the table is self-referential. Toplevel categories have a null parent_category_id.
When building tables like this you do need to be careful that you don't create a circular reference.