Delete - referential integrity, Database Management System

Assignment Help:

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.


Related Discussions:- Delete - referential integrity

Define a table in sql known as client for store information, Define a table...

Define a table in SQL known as Client that is used to store information about the clients. Define CLIENT_NO as the primary key whose first letter must begin with ‘C'. Also ensure t

E-commerce and business intelligence systems., Your friend owns and operate...

Your friend owns and operates a wholesale shoe business with annual revenues of $5 million dollars. His wholesale business specializes in supplying and supporting retailers with sh

Identify the candidate keys, Consider the following six relation schemes an...

Consider the following six relation schemes and their corresponding sets of functional dependencies. In each case identify a. All the candidate keys b. The highest normal for

Search the salary of employees who are not ‘analyst’ , Example- Search the ...

Example- Search the salary of employees who are not 'ANALYST' but get a salary below than or equal to any people employed as 'ANALYST'. SELECT EMPNO, ENAME, JOB, SAL FROMEMP

Differentiate between procedural and non procedural language, Differentiate...

Differentiate between Procedural and non procedural languages ? Procedural and non procedural languages - A procedural language specifies the operations to be performed on th

What are object interaction diagrams, What are object interaction diagrams?...

What are object interaction diagrams? Object interaction diagrams are the diagrams that used to describe order in which messages are communicated in execution of an operation,

Define one-way associations using pointers, One-way Associations If an...

One-way Associations If an association is only traversed in single direction, then it is known as one-way association. It is implemented as a pointer or an attribute which con

Explain trigger, What is Trigger? A trigger is a SQL procedure that ini...

What is Trigger? A trigger is a SQL procedure that initiates an action when an event (INSERT, DELETE or UPDATE) occurs. Triggers are kept in and managed by the DBMS. Triggers a

What is the difference between where and having clauses, What is the differ...

What is the difference between WHERE and HAVING clauses?. Predicates in the WHERE clause applies to every tuple while the predicate in the HAVING clause applies to groups.

Icloud based storage, Advantages and disadvantages of icloud based storage

Advantages and disadvantages of icloud based storage

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd