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

What is data integrity, What is data integrity? Ans: It is the data con...

What is data integrity? Ans: It is the data consisted of in database that is accurate and consistent.  (Data integrity means that the data should be valid as per to the give

Explain the outer join, Define Outer join Outer join - If there are any...

Define Outer join Outer join - If there are any type of values in the one table that do not have corresponding value(s) in the other, in an equi-join which will not be selected

Shared lock or read lock, Shared lock or Read Lock It is requested ...

Shared lock or Read Lock It is requested by a transaction that needs to just read the value of data item. A shared lock on a data item does not permit an exclusive lock

Explain the exists and unique functions of sql, Explain the EXISTS and UNIQ...

Explain the EXISTS and UNIQUE functions of SQL. Give an example for each? EXISTS: The EXISTS function takes one parameter that is a SQL statement. If any records exist which

What are the two statements regarding transaction, What are the two stateme...

What are the two statements regarding transaction? The two statements regarding transaction of the form are:- A)     Begin transaction B)      End transaction

What do you understand by raid, What do you understand by RAID? Explain RA...

What do you understand by RAID? Explain RAID Level 4 and Level5? RAID - It is stands for Redundant Array of Inexpensive Disks (as named by the inventor), or alternatively Re

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.

Design an entity relation model, Funky Festivals Specification Funky Fe...

Funky Festivals Specification Funky Festivals organise music festivals which take place at various venues throughout the UK.  A venue needs to be booked before a Festival can t

Express the ways provided by mysql for pattern matching, Express the ways p...

Express the ways provided by MySQL for Pattern Matching? MySQL provides two kinds of pattern matching. 1) One is based on SQL patterns 2) Regular expressions.

Relational constraints, Relational and E-R Model There are three types o...

Relational and E-R Model There are three types of constraints on relational database that have: DOMAIN CONSTRAINT PRIMARY KEY CONSTRAINT INTEGRITY CONSTRAINT

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