Hi
You can have foriegn key relationship for subcategory with delete cascade option
if you have foriegn key you can alter it or can add it
ALTER TABLE subcategory
ADD CONSTRAINT fk_category
FOREIGN KEY (cat_id)
REFERENCES Category(cat_id)
ON DELETE CASCADE;