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

What is a b+-tree index, What is a B+-Tree index? A B+-Tree index takes...

What is a B+-Tree index? A B+-Tree index takes the form of a balanced tree in which each path from the root of the root of the root of the tree to a leaf of the tree is of the

Define Fifth Normal form is concerned with, Define Fifth Normal form is con...

Define Fifth Normal form is concerned with Ans : Fifth Normal form is concerned with Join dependency.

State the steps of object design, State the Steps of Object Design ...

State the Steps of Object Design Object design is a very iterative process in which various classes, relationships among objects are added when you move from one level to

Define the query optimisation, Define the Query optimisation The query ...

Define the Query optimisation The query parser commonly generates a standard initial tree to correspond to an SQL query, with no doing any optimization. Such type of a canonica

Develop a flowchart using the decision structure, 1.  Develop a flowchart u...

1.  Develop a flowchart using the decision structure to solve the following problem. A Box Lunch Bonanza is a small catering company that offers 2 different types of box lunches

Explain dml with some examples, Explain DML with some examples? DML - D...

Explain DML with some examples? DML - Data Manipulation Language: statements used for managing data within schema objects. Some examples: • SELECT - retrieve data from the a da

Keys, #questiontypes of keys examples..

#questiontypes of keys examples..

How is concurrency identified, How is concurrency identified? Concurren...

How is concurrency identified? Concurrency in objects can be identified by the way they alter their state. Current objects can change their state independently. Aggregation imp

What is the object-oriented decompositions, Object-oriented decompositions ...

Object-oriented decompositions Object-oriented decompositions of systems better are able to cope with change. Each subsystem has a well-defined interface which communicates with

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