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
Discuss The difference between drop table R and delete from R.  DROP TABLE command deletes all the records with the table definition. This command will automatically committed

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

Data Manipulation Language Data manipulation language (DML) describes a set of commands that are used to query and change data within existing schema objects. In this case comm

State as Location within a Program In this traditional approach, location of control inside a program totally defines the program state. Any finite state machine may be implem

why are older data models are being replaced by new data models

Horizontal Fragmentation- Horizontal fragmentation groups together the tuples in a relation that are collectively used by the main transactions. A horizontal fragment is produced b

Eliminate Redundant Data In the "Database Relation" above, the primary key is made up of the D-ID and the Emp-ID. The database-name relies only on the D-ID. The similar databas

How is Oracle used in PL/SQL? Define the features of process and how they are defined? PL/SQL - PL/SQL is Oracle's procedural language (PL) superset of the Structured

Define the term Domain. For each n every attribute there is a set of permitted values known as the domain of that attribute.

intent locking