When two tables are connected with Foreign key and data in the parent table is deleted, for which record exists in child table too, then followings are the ways to maintain data integrity −
On Delete Cascade
This option will remove the record from child table too if that value of the foreign key is deleted from the main table.
On Delete Null
This option will set all the values in that record of child table as NULL, for which the value of the foreign key is deleted from the main table.