Start networking and exchanging professional insights

Register now or log in to join your professional community.

SUBHAM MONDAL MONDAL
by SUBHAM MONDAL MONDAL , WebTek Labs Pvt. Ltd

ON DELETE CASCADE is an optional clause in a foreign key declaration.

It is a foreign key integrity.It is of two type.cascade update and cascade delete.It stated that any time we can change/delete the value of a field of the primary key column and matching value in another column of another related table will be changed/deleted. Integrity constraints will be maintained.  

Vishnuvardhinii S
by Vishnuvardhinii S , Project Engineer , WiproTechnologies

A foreign key with cascade delete means that if a record in the parent table is deleted, then the corresponding records in the child table will automatically be deleted.

REVATHY VENUGOPAL
by REVATHY VENUGOPAL , Graduate Teaching Assistant , Govt. Engineering College

In SQL, cascade delete means if one of the parent record is deleted, then all the corresponding child record will be deleted automatically. In DBMS, there is also an operation called cascading roll back. That is, if a transaction T1 fails, then all other transactions depending on T1 must be roll backed. This is also a cascading effect.  

Gayasuddin Mohammed
by Gayasuddin Mohammed , Advocate , Practicing Law before High Court at Hyderabad

It looks for master-child relationship constraint. so if you want to delete master without deleting the child data, it throws an error as exception. My 2 cents. Thanks.

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.