Constraints violation during insertion, Database Management System

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

Posted Date: 3/6/2013 5:37:05 AM | Location : United States







Related Discussions:- Constraints violation during insertion, Assignment Help, Ask Question on Constraints violation during insertion, Get Answer, Expert's Help, Constraints violation during insertion Discussions

Write discussion on Constraints violation during insertion
Your posts are moderated
Related Questions

By using the delete operation some consisting records can be deleted from a relation. To delete some definite records from the database a condition is also specified based on which

What is the use of Union and intersection operation? Union: The result of this operation contains all tuples that are either in r1 or in r2 or in both r1 and r2.Duplicate tuple

Which of the operations constitute a basic set of operations for manipulating relational data? Relational algebra operations constitute a basic set of operations for manipulati

Explain the relevance of Data Dictionary in a Database System? Data dictionary is a database in its own right residing on the disk that consist of Meta data which is = Data abo

What is the use of unique function? UNIQUE function: If UNIQUE is specified then only unique values are used to computed the mean.

For every multivalued attribute 'A', we make a new relation R that contains an attribute corresponding to plus the primary key attribute k of the relation that shows the entity typ

a)  Suppose we updated the catalog tables in real time, that is, after every update, insert, or delete SQL statement were executed-rather than only running RUNSTATS once every few

Define value set? Value set: It is a set of values. You do not always need a user to enter junk free text within all the fields. Therefore, Oracle Apps uses value set to valida

We want have a website; we need to test the security of our website. You need to: -Try to bypass our security by simulate a website hacking -Try some hack Techniques like