I've two tables:

Band: id_band(pk), name, genre, country


Musician: id_musician(pk), name, surname, function, activity

The connection between both of these tables is N:M and each side mandatory - This guitar rock band does exist only when it's any music artists or even the music performer is available only of he/she's "connected" with a few band. Therefore the CASE creates me additionally a binding table known as PLAYING (music performer plays in band). What I wish to check is, that for instance basically remove all of the connections of music artists playing in certain band in the table PLAYING, then even the Band ought to be erased, since it doesn't have music artists! Which should work also the other way around, after i remove all of the connections of some music artists to any or all his bands, he ought to be erased also, becaus he does not play in almost any band.

Does someone understand how to do that? With a few example?

Thanks for each suggestion! I personally use oracle 10g.