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

What is predictive modelling, Problem: (a) Data mining is one of the b...

Problem: (a) Data mining is one of the best ways to analyse data and using software techniques, hidden and unexpected patterns and relationships in sets of data can be extrac

Processing arrays, 1. A company wants a report containing a breakdown of pa...

1. A company wants a report containing a breakdown of payroll by department. Input, which should be stored in 3 parallel arrays, includes each employee's department number, hourly

What are the concurrency issues, Concurrency issues Data integrity...

Concurrency issues Data integrity: Threads accessing same object need to be synchronized, such as: banking account. Deadlock: One or more threads in system are perman

Functional dependency, Functional Dependency Consider a relation R that...

Functional Dependency Consider a relation R that has 2 attributes A and B. The attribute B of the relation is functionally dependent on the attribute A if and only if for every

State the rearranging the execution order for efficiency, Define the step -...

Define the step - Rearranging the Execution Order for Efficiency As we know that algorithm and data structure are closely related to one another, but data structure is conside

Define hot backup, Hot Backup: Some sites cannot terminate the database wh...

Hot Backup: Some sites cannot terminate the database while creating a backup copy of the files. The cold backup is not a reliable option. So different kinds of backing up database

Database problem in wordpress, Project Description: I am having a random...

Project Description: I am having a random problem with my Wordpress site. If I click on "Publish" and "Add new", it takes me to a 404 page not found of /wp-admin/post.php (th

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