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 known as fudge factor, What is known as fudge factor? The numbe...

What is known as fudge factor? The number of partitions is enhanced by a small value called the fudge factor, which is usually 20 percent of the number of hash partitions compu

Define seek time, Define seek time. The time for repositioning the arm ...

Define seek time. The time for repositioning the arm is known as the seek time and it enhances with the distance that the arm is known as the seek time.

In a hierarchical model of data records are organized, In a Hierarchical mo...

In a Hierarchical model of data records are organized ? In the hierarchical model of data records are organized as Tree structure.

Describe the major steps in the implementation process, Question: (a) ...

Question: (a) One of the steps in the five-step problem-solving model is implementation. Implementation is considered a key step in the problem-solving model. A problem may be

Describe specialsation and generalization, Describe Specialsation and gener...

Describe Specialsation and generalization? Specialisation /generalization: This is a top down and bottom up approach to the design of database. It displays the IS_A relation

Draw an er diagram with primary key for a farm, Draw an ER diagram that rep...

Draw an ER diagram that represents the information described below. Show all entity sets, relationship sets, primary keys, and the mapping cardinality of the relationship sets.

Student database, tell me the functionality,advantages and disadvantages of...

tell me the functionality,advantages and disadvantages of student database

3NF Normalization, Need 2 projects completed in 3NF format.

Need 2 projects completed in 3NF format.

What are the time stamps associated with each data item, What are the time ...

What are the time stamps associated with each data item? W-timestamp (Q) denotes the largest time stamp if any transaction that implemented WRITE (Q) successfully. R-timesta

Copy data from one database to another database, Copy Data from One Databas...

Copy Data from One Database to another Database Project Description: I am having two MySQL databases with same tables. I just need to copy one Data from one to another dat

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