Dealing with constraints violation, Database Management System

Assignment Help:

If the deletion violates referential integrity constraint, then three alternatives are available:

  • Default option: - refuse the deletion. It is the job of the DBMS to describe to the user why the deletion was rejected.
  • Attempt to propagate (or cascade) the deletion by deleting tuples that reference the tuple that is being deleted.
  • Vary the value of referencing attribute that origins the violation.

Example:

Let R:

A#

B

C^

A1

B1

C1

A2

B3

C3

A3

B4

C3

A4

B1

C5

Q

C#

D

C1

D1

C3

D2

C5

D3

 

 

 

Note:

1) '#' shows the Primary key of a relation.

2) '^' shows the Foreign key of a relation.

(1) Delete a tuple with C# = 'C1' in Q.

Violated constraint: - Referential Integrity constraint

Motive: - Tuples in relation A refer to tuple in Q.

Dealing: - Options available are

1)  Decline the deletion.

2)  DBMS may automatically delete all tuples from relation S and Q with C

# = 'C1'. This is known as cascade detection.

3)  The one more option would result in putting NULL value in R where C1 exist, which is the initial tuple R in the attribute C.


Related Discussions:- Dealing with constraints violation

Set concept is used in which type of modelling, SET concept is used in whic...

SET concept is used in which type of modelling? SET concept is used in Network Model.

Information infrasture, what benefit can a company gain by managing its own...

what benefit can a company gain by managing its own infrasture and services

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

coventions for displaying an ER schema as ER diagram

RDM & ER Modelling, #questiRegional Gardens has many nurseries, including W...

#questiRegional Gardens has many nurseries, including Wagga Wagga, Bathurst, Albury, Orange, and Dubbo. Each nursery is known by its campus code, eg WW, B, A, O and D respectively.

Explain sorted file with advantages, Explain sorted File with advantages? ...

Explain sorted File with advantages?  Sorted file The sort utility shall perform one of the subsequent functions: 1.Sort lines of all the named files together and write the

Define- relational algebra, Define- relational algebra. The relational ...

Define- relational algebra. The relational algebra is a procedural query language. It having of a set of operations that take one or two relation as input and make a new relati

Implementation of association as an object, Implementation of association a...

Implementation of association as an object Implement as a separate association object, independent of either class, as in Figure. An association object is a group of pairs

What is data mining?, Question 1 Define OLTP? Explain the Differences betw...

Question 1 Define OLTP? Explain the Differences between OLTP and Data Warehouse Question 2 What is Architecture? Explain various components involved in it Question

Explain the timestamps for read operations, Timestamps For Read operations:...

Timestamps For Read operations: If TS (T) If TS (T) >= W-timestamp (Q), then the transaction T is trying to read a value of data item Q which has been written and committed

Sql, sql is relationally complete-justify

sql is relationally complete-justify

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