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
What are the advantages of DBMS ? 1. Centralized Management and Control - One of the major advantages of using a database system is in which the organization could exert, thr

What disadvantage of ODBC does OLE DB overcome? By breaking the features and the methods of a DBMS into COM objects, OLE DB characteristic overcomes a main disadvantage of ODBC

Define a job scheduling strategy that will meet business requirement of reporting availability by 6am CST for the following cubes? Show the job scheduling dependencies in a pictori

When are they useful? Justify with an example. The temporary tables are commonly used to support specialized rollups or exact application processing needs. Unlike a permanent t

Define the categories of SQL Statements? 1) Statements that don't return a result set. This statement class includes INSERT, DELETE, and UPDATE. 2)Statements that return

Explain the function of input controls. Identify four types of input control and explain the function of each. Provide an example of a data integrity error that could occur i


10A.53 Code an Oracle Database trigger to enforce the constraint that an employee can never change his or her department. 10A.54 Code an Oracle Database trigger to allow the

Question 1 List and explain various Normal Forms. How BCNF differs from the Third Normal Form and 4th Normal forms? Question 2 Describe the concepts of Structural Semantic Da

What are the several kinds of the update operations on relations? Also explain the constraints on these update operation. Give instance in support of your answer. There are th