Constraints violation during insertion, Database Management System

Assignment Help:

If the insertion violates one or more constraints, then two alternatives are available:

  • Default option: - Insertion can be discarded and the reason of refusal can also be explained to the user by DBMS.
  • Ask the user to resubmit, correct the data, also give the cause for rejecting the insertion.

Example:

Consider the Relation PERSON of Example :

PERSON

 

1015_Constraints violation during insertion.png

(1)     Insert<1, 'Vipin', 20, 'Mayur Vihar'> into PERSON

Violated constraint: - Key constraint

Reason: - Primary key 1 already exists in PERSON.

Dealing: - DBMS could ask the user to give valid PERSON_ID value and accept the insertion if valid PERSON_ID value is given.

 

(2)     Insert<'null', 'Anurag', 25, 'Patparganj'> into PERSON

Violated constraint: - Entity Integrity constraint

Reason: - Primary key is 'null'.

Dealing: - DBMS could ask the user to give valid PERSON_ID value and accept the insertion if valid PERSON_ID value is given.

 

(3)     Insert<'abc', 'Suman', 25, 'IP college'> into PERSON

Violated constraint: - Domain constraint

Reason: - value of PERSON_ID is provide a string which is not valid.

 

(4)     Insert <10, 'Anu', 25, 'Patpatganj'> into PERSON

Violated constraint: - None


Related Discussions:- Constraints violation during insertion

Define deadlock avoidance, Define Deadlock avoidance These protocols a...

Define Deadlock avoidance These protocols as well ensure that the system will never enter a deadlock state although the way it is done is different from deadlock prevention. I

Primary key, The primary key is selected from the

The primary key is selected from the

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

Database management issues, You are required to write a report which evalua...

You are required to write a report which evaluates two of the following issues in relation to your case study database: a. Security issues b. Performance issues c. Backup

What are the two aspect to the implementation of association, What are the ...

What are the two distinct aspects to the implementation of associations? i) It is required to define data declarations which will enable details of actual links to be stored. I

Improve efficiency in query evaluation, Question: AirwaysCentre, an int...

Question: AirwaysCentre, an international airline booking company currently uses a relational database system for their operations, which includes the following relations: P

Project, write a database program for concurrency transaction in a bank

write a database program for concurrency transaction in a bank

Write short notes on extension and intension, Write short notes on extensio...

Write short notes on extension and intension? In any data model, it is significant to distinguish among the description of the database and the database itself the description

Aggregation, Design a database for an airline.The database must keep track ...

Design a database for an airline.The database must keep track of customers and their reservations,flights and their status, seat assignment on individual flights and, the schedule

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