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
These permit the user to unload a database or parts of a database and reload the data on the similar machine, or on another machine in a dissimilar location. This can be useful in

what is the need of a log in dbms

Ask Write the SQL code that will create the table structure for a table named EMP _1. This table is a subset of the EMPLOYEE table. The basic EMP_1 table structure is summarized in

Designing the fields in the data base The following are the considerations one has to remain in mind while designing the fields in the data base. Coding, compression, en

In this programming assignment, you will develop a simple database of student records. Here are the requirements: 1) A student record contains a name and a number. We assume tha

Identification of concurrency Identification of concurrency: Dynamic model identifies concurrency. Two objects are said to be parallel (concurrent) if they can receive events a


The definition of the classes and operation can often be adjusted to increase the amount of inheritance". Justify the above statement.   Adjustment of Inheritance The def

Views A view is like a window by which data from tables can be changed or viewed. The table on which a view is based is known as Base table. The view is stored as a SELECT stat

Equi Join: A join in which the joining condition is based on equality among values in the common columns. Common columns show (redundantly) in the result table. Let us Consider th