create foreign keys and while declaration put
ondelete cascade. -- for deleting rows when row is deleted from main table.
u can also use -
onupdate cascade -- for updating rows when main table is updated.
hope it helps.
Hope it helps.
-Manas
=======================================
If this post is useful to you, please mark it as answer.