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 is DBMS and what are functions of DBMS? DBMS consist of collection of integrated data and set of program to admission those data. The functions performed by a typical

List the internal controls that should be in effect solely because a EDP system is employed, classifing them as (1) Those controls pertaining to input of information and (2) All ot

What is a disjoint less constraint? Ans: It needs that an entity belongs to no much more than one level entity set.  Disjoint less constraint needs that an entity belongs to

The technique of converting the state diagram to code a) Identify all major control paths. Start from initial state; choose a path across the diagram that corresponds to normal

Consider the E/R schema with weak entity sets shown below. Come up with the SQL CREATE TABLE statements (with appropriate primary key, unique and foreign key constraints). Include

List the drawbacks of relational database system A) Repetition of data B) Inability to s certain information.

What is the meaning of Recovery? In deferred update methods, if a transaction fails before arriving its commit point, it will not have altered the database in any way, so UNDO

Define Forms Based Interfaces? Forms-Based Interfaces - A forms-based interface display a form to each user. Forms are commonly designed and programmed for naive users and inte

The primary key is selected from the

What is the use of group by clause?  Group  by  clause  is  used to apply  aggregate  functions  to a  set  of  tuples. The attributes given in the group by clause are used to