i'm guessing you're not looking for a simple couple SQL statements?
delete from courses where instructor_id=$instructorID;
delete from instructor where instrutor_id=$instructorID
again, sorry, i'm sure this isn't what you wanted - if it's not, explain what you're lookin for?