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
Timestamps For Read operations: If TS (T) If TS (T) >= W-timestamp (Q), then the transaction T is trying to read a value of data item Q which has been written and committed

explain exhaustively the problems associated with ER diagrams. include illustrations in your answer

Define the Division Operation of Relational Algebra Let R be a relation comprising attributes (A1,...Ap,Ap+1,...An) and S comprising attributes (Ap+1,...An)  DEF: Division

What is the difference among a primary index and a secondary index? Primary Index: A primary index is an ordered file whose records are of fixed length along with two fields.

Relational and E-R Model There are three types of constraints on relational database that have: DOMAIN CONSTRAINT PRIMARY KEY CONSTRAINT INTEGRITY CONSTRAINT

What is Stored Procedure? A stored procedure is a named group of SQL statements that have been previously formed and kept in the server database. Stored procedures accept input

Short Note on mid Square Method of hashing? Mid square method of hashing: In the method midsquare hashing, the key is squared and the address selected from the center of the s

ADVANCE OBJECT DESIGN Introduction Analysis is the initial step of the OMT methodology. It is apprehensive with devising a precise, concise, correct and understandable mo

If R1 and R2 are two union compatible relations or functions, then the result of R3 = R1 ∩R2 is the relation that contains all tuples that are in both the relations In other words,

Hi, Do you offer private tuition for DBMS?