I am trying to create a hierarchy of categories and subcategories. The ENUM type makes the most sense to me, but I am trying to figure out how to create the tables to model my data. I have a list of categories. I also have a list of subcategories that are going to be in a 1 to many relation with the category. Here are my ENUMs.
CREATE TYPE categories as ENUM('Casting', 'Cutting');CREATE TYPE casting_subs as ENUM('Composite', 'Metal', 'Plastic', 'Rubber', 'Foam');CREATE TYPE cutting_subs as ENUM('Die Cutting', 'Flame', 'Laser', 'Plasma', 'Saw', 'Waterjet');How do I create the tables that models my data?