Why to use foreign keys with no action on delete or update
I think you’re misunderstanding what ON DELETE NO ACTION means. It does not mean to suppress the foreign-key constraint. When you delete a record that is referred to by a foreign key, InnoDB has the ability to take an automatic action to rectify the situation: it can CASCADE, meaning, delete the referring record. (This would … Read more