Constraints violation during insertion, Database Management System

Assignment Help:

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


Related Discussions:- Constraints violation during insertion

What create when a primary key combined with a foreign key, What will be cr...

What will be create when a primary key if combined with a foreign key? A primary key if combined with a foreign key it creates Parent-Child relationship between the tables that

Hashing.., various techniques of hashing?

various techniques of hashing?

Indexed (indexed sequential) file organisation, Indexed (Indexed Sequential...

Indexed (Indexed Sequential) File Organisation It organises the file like a big dictionary, i.e., records are kept in order of the key but an index is stored which also allows

Tuples-attributes , Consider a relation s over the attributes A and B wit...

Consider a relation s over the attributes A and B with the following characteristics: 5,000 tuples with 10 tuples per page A 2-level B+ tree index on attribute

Assigning responsibility for operation, Assigning Responsibility for Operat...

Assigning Responsibility for Operation Many operations might have obvious target objects, but some of these operations could be used at numerous places in an algorithm, by one

Design a gennalization and specialization hierarchy for an a, Design a genn...

Design a gennalization and specialization hierarchy for an automobile sales company

Data manipulation language, Question 1 Discuss about second normal form an...

Question 1 Discuss about second normal form and third normal form Question 2 Write short note on                        1) Data Manipulation Language 2) Data Definition La

3-schema architecture, Gyan Gurukul is a software company that provides sof...

Gyan Gurukul is a software company that provides software related solution. Ashutosh Dubey who is the director of Gyan Gurukul want a three-level schema architecture for the Gyan G

Explain the concept of qbe, Explain the concept of QBE? Query-by-exampl...

Explain the concept of QBE? Query-by-example represents a visual/graphical approach for accessing information in a database by the use of query templates called as skeleton tab

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd