I have a mysql db that has approx. 60 tables. There's a main table called "Products" where all the product exists, product ids, description, etc. There are many other table such as categories, subcategories that may or may not contain data pertaining to the "Products" table.
For example, if I have a product that has a 'productid' = "1" and I want to delete the product from the database, how to I delete all the associated data in other tables if I don't know whether the data exists in the other tables?
Thanks.