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
Write a short note on oracle Instance? Oracle Instances: An instance is the (executed) Oracle software and the memory they use. It is the instance which manipulates the data s

A relation has: Relational Schema Relation instance Relational Schema: A relational schema shows the relation's name, its attributes and the domain of every a

Consistency error : These errors happen due to the inconsistent state of database caused may be due to wrong implementation of commands or in case of a transaction abort.  To overc


Timestamps For Read operations: If TS (T) If TS (T) >= W-timestamp (Q), then the transaction T is trying to read a value of data item Q which has been written and committed

Hi, Do you offer private tuition for DBMS?

wrie a report on whether a BSc n information systems develops the skills required by employers in Database administration

What is system log?  What are the entries?       Ans:  The system log that is generally written on stable storage contains the redundant data required to recover from volatile

Object-oriented decompositions Object-oriented decompositions of systems better are able to cope with change. Each subsystem has a well-defined interface which communicates with

What is a database graph? The partial ordering implies that the set D may now be viewed as a directed acyclic graph, known as a database graph.