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
Why is database redesign necessary? Database redesign is essential for two reasons. First, redesign is essential both to fix mistakes made during the initial database design. S

What is transaction? Collections of operations that form a single logical unit of work are known as transactions.

Explain the integrity constraints: Not Null,  Unique, Primary Key with an example each. Is the combination 'Not Null, Primary Key' a valid combination. Justify. Not Null - Shou

What is completeness constraint on generalization? Define the variation between total and partial design constraint. Give an example each.       Ans: Completeness Constraints

1.Suppose you are given a dataset that consists of a random sample of tasters, on which the following variables were obtained: (y) Zpref = taste preference for green beans store

Project Description: I am having a random problem with my Wordpress site. If I click on "Publish" and "Add new", it takes me to a 404 page not found of /wp-admin/post.php (th

If the insertion violates one or more constraints, then two alternatives are available: Default option: - Insertion can be discarded and the reason of refusal can also be ex

#queDefine a job scheduling strategy that will meet business requirement of reporting availability by 6am CST for the following cubes? Show the job scheduling dependencies in a pic

Explain CNT in the respects of QBE ? CNT: It is one of the aggregation commands given in QBE. It is used to identify number of tuples

Create 1 experiment to demonstrate an aspect of query optimisation by using access-path structures (indexes), decomposition, or denormalisation. Once satisfied with your experiment