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 are the aggregate objects in the data dictionary, What are the aggrega...

What are the aggregate objects in the data dictionary? Views Match codes Lock objects.

ER diagram, Construct a clean ans concise ER diagram for the database indic...

Construct a clean ans concise ER diagram for the database indicating the cardinality mapping for Employee management syatem

Mapping, external and internal mapping with examples

external and internal mapping with examples

Nested queries, Nested Queries Let us see some more complex queries in ...

Nested Queries Let us see some more complex queries in this section. Sub-queries: Some of the basic concerns of sub-queries are: A sub-query is a SELECT statemen

Explain embedding sql statements, Question 1 Explain the functions of t...

Question 1 Explain the functions of the following Storage Manager Buffer Manager Transaction Manager 2 Discuss about system catalog in a relational DBMS 3

Update anomaly-data redundancy, Update Anomaly : This anomaly is occurred d...

Update Anomaly : This anomaly is occurred due to data redundancy. Redundant information makes updates more complex since, for example, varying the name of the instructor of MCS-014

State about the tables- DBMS, State about the Tables- DBMS Data is sto...

State about the Tables- DBMS Data is stored in columns and rows (much like a spreadsheet -main difference is how data is organised). Every row in a table is known as a record

Misuse of data or a database, As with other software, databases can potenti...

As with other software, databases can potentially be used for unethical purposes. As a database developer, and a consumer, you should recognize database misuse, and how it may affe

View serialiabilty-labelled precedence graph, how to construct labelled pre...

how to construct labelled precedence graph for view serialiability.please explain insteps with one solved examples

ER model, coventions for displaying an ER schema as ER diagram

coventions for displaying an ER schema as ER diagram

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