Delete - referential integrity, Database Management System

During the deletion of a tuple two cases can happen:

Deletion of tuple in relation having the foreign key: In this type of case simply delete the desired tuple. For example, in ASSIGNMENT relation we can simply delete the first tuple.

Deletion of the target of a foreign key reference: For instance, an attempt to delete an employee tuple in EMPLOYEE relation whose EMPID is 101. This employee shown not only in the EMPLOYEE but also in the ASSIGNMENT relation. Can these tuple be deleted? If we delete the tuple in EMPLOYEE relation then two unequalled tuples are left in the ASSIGNMENT relation, therefore causing violation of referential integrity constraint. Therefore, the following two choices be for such deletion:

RESTRICT - The delete operation is "restricted" to only the situation where there are no such matching tuples.    For instance, we can delete the EMPLOYEE record of EMPID 103 as there is no matching tuple in ASSIGNMENT but not the record of EMPID 101.

CASCADE - The delete operation "cascades" to delete also those matching tuple. For  instance,  if  the  delete  mode  is  CASCADE  then  deleting  employee  having

EMPID as 101 from EMPLOYEE relation will also make deletion of 2 more tuples from ASSIGNMENT relation.

Posted Date: 3/6/2013 6:38:23 AM | Location : United States

Related Discussions:- Delete - referential integrity, Assignment Help, Ask Question on Delete - referential integrity, Get Answer, Expert's Help, Delete - referential integrity Discussions

Write discussion on Delete - referential integrity
Your posts are moderated
Related Questions
Explain Strict Two-Phase locking A transaction T does not release any type of its exclusive (X) locks until that transaction commits or aborts. In this method no other transact

What is Foreign Key Foreign Key: Sometimes we may have to work with an attribute that does not have a primary key of its own. To recognize its rows, we have to use the primar

3NF Normal Form A relation schema R is in 3NF if it is in 2NF and for each FD X A either of the following is true X is a Super-key of R. A is a prime attribute of R

The database application project (DAP) for this assignment consists of the creation of a fully functional Microsoft Access database application for a real client. I recommend you s

Problem 1. Write the SQL queries using Data Manipulation Language (DML) statements. Insert values into student table with field names using insert command Display the

Assume that you are responsible for selecting a new DBMS product for Sohar Hospital

Mention the various user privileges All privileges directly granted to the user or role. All privileges granted to roles that have been granted to the user or role.

Draw entity relationship diagram for the following scenario. A university has many departments whereas each department belongs to that particular uni. That uni has also many bui