If mydb class is already available in the database table class table student (id, name) and students (id, name, cid), which in the student table cid said the class number, please set up foreign key constraints, in the student table cid, refused to delete operation on class table contains data on the class list is updated automatically update data relevant to the student table,
inquire