update relation between ad and category