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 are the physical characteristics of magnetic disks, What are the physi...

What are the physical characteristics of magnetic disks?   Ans: A magnetic disk is a circular plate or platter of plastic or metal that is coated with magnetizable material lik

Which is an advantage of view, Which is an advantage of view? The Advan...

Which is an advantage of view? The Advantages of view is Data security, Derived columns and Hiding of complex queries

Modifyand removing a sequence-sequences, Modify a sequence: ALTER SEQU...

Modify a sequence: ALTER SEQUENCE SEQSS INCREMENT 2 MAXVALUE 3000;   Removing a sequence: DROP SEQUENCE SEQSS;

What are the several forms of identity, What are the several forms of ident...

What are the several forms of identity? a) Value b) Name c) Built-in

What is the main advantage of the object model, What is the main advantage ...

What is the main advantage of the object model? What are its different components? The object model focuses on the logical data structures. Each object model comprises of many

Define 2nf normal form, 2NF Normal Form : A relation schema process R i...

2NF Normal Form : A relation schema process R is in 2NF if it is in 1NF and each non-prime attribute A in R is fully functionally related on primary key. Second normal form (2N

What are the various properties of relational tables, What are the various ...

What are the various properties of Relational tables? Relational tables have 6 properties: 1. Each row is unique. 2. Column values are of the same kind. 3. Values are

What is object containment, What is object containment? References amon...

What is object containment? References among objects can be used to model dissimilar real-world concepts.

Database, i would like to ask if you will do assignment of database number ...

i would like to ask if you will do assignment of database number of words 1500 and how much

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