- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What are the different ways to maintain data integrity in child table when the record is deleted in parent table?
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.
Advertisements