What does data integrity men?
Data integrity implies that a row in one table should not be deleted until all referencing rows that use its key are also deleted. Classic example customer table and order table where the order table contains the id from the customer table. If you delete the row from the customer table then any orders with that ID are left “hanging”. You cannot determine who ordered them and who to charge the order to or who to ship it to. So, if you setup integrity between the two then the orders must be deleted before the customer is deleted.