AFAIK, mysql doesn't have much to offer on this. It has to do with data integrity, which mysql apparently does not have.
I'm looking into using postgres for this reason-- you can tell the database which tables have records that are dependant on data from other tables; i.e. if you delete a row from one table, it can cascade delete on another.
But for mysql, it's up to you to keep track of your keys. If your data is recursive, you'll probably have to delete it recursively unless you have some id that distinguishes the groups. 🙁 (hope that makes sense...)