U can try to make foreign relation with both tables and when u delete relation from table where is exists many to many relation, u can easily see that in both tables matched rows are deleted