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
Security: In a centralised system, access to the data can be simply controlled. Though, in a distributed DBMS not only does access to replicated data have to be controlled in many

What is RDBMS terminology for a row? A tuple is a RDBMS terminology for a row

Explain the Deferred Update The deferred update methods do not physically update the database on disk till after a transaction reaches its commit point; after that the updates

Need for Multiple Access Paths In practice, most of the online information systems need the support of multi-key files. For example, consider a banking database application hav


Project Description: I need a point of sale for motels. It needs to run on windows and requires being network able so that we can have more than one computer using it at once.

growing phase and shrinking phase are disjoint, why ?

Gaps in sequence values can happen when: -     A rollback happens that is when a statement changes are not accepted. -     When the system crashes -     When a sequence i


properties of derirable decomposition