add check referential integrity when created category