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

What are the various symbols used to draw an E-R diagram? Explain with the help of an example how weak entity sets are represented in an E-R diagram. Various symbols used to d

what is the need of a log in dbms

Relational Algebra is a set of basic operations used to influence the data in relational model. These operations allow the user to specify basic retrieval request. The result of re

What are the two statements regarding transaction? The two statements regarding transaction of the form are:- A)     Begin transaction B)      End transaction

Using the questions found at the end of Chapter 9 in your textbook, complete this homework activity. Students will submit a Word document answering questions 2, 3, and 4.

Project Description: I would like to get a database of a website which has clients email name and phone number. If you are able to get information from a website, by entering

What is Derived and stored Attribute? Derived and Stored Attribute - In a few cases, two or more attribute values are associated, for example, Age and BirthDate attributes of a

Compute the closure (F+) for the following set of the functional dependencies defined on R(a,b,c,d), where F - {c→ a, ab → d, a → b, d → c}, i.e. what are all of the FDs implied b

What is a recursive relationship? Give an example not used in the text. A recursive relationship is a relationship among an entity and itself. For example, given the entity PER