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 is OMR? OMR (Optical Mark Recognition) is the translation of marks - or the absence of marks - but not the shape of the mark on forms that have small circles ("also called

courier company er-diagram

Explain the Aggregation implies concurrency Concurrency actually is: This in objects can be identified by the way they change state. Present objects can change state independen

3NF Normal Form A relation schema R is in 3NF if it is in 2NF and for each FD X A either of the following is true X is a Super-key of R. A is a prime attribute of R

Describe disk manager and their work? Disk Manager: Responsible for fetching data regulated through file Manager from disk storage within Main memory and deciding what data to

Illustrate the collaboration and relationship diagram A collaboration is the society of interfaces, classes and other elements which work together to provide some cooperative b

A Data Model in software engineering is an abstract model that organizes and documents the business data for interaction between team members and is used as a plan for creating

Consider the subsequent relations for a database which keeps track of business trips of salespersons in a sales office: SALESPERSON (SSN, Name, start_year, Dept_no) TRIP (SSN, Fr

Suppose an instruction takes 1 nanosecond to execute (on average), a page fault takes 20 microseconds of processor time, and it takes 300 microseconds of disk time to read or write

Differentiate between a Global and a Local temporary table? - A local temporary table exists only for the duration of a connection or if defined inside a compound statement, fo