Cases of constraint violations, Database Management System

(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 provide valid PERSON_ID value and accept the insertion if valid PERSON_ID value is provided.

 

(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 provide valid PERSON_ID value and accept the insertion if valid PERSON_ID value is provided.

 

(3)     Insert<'abc', 'Suman', 25, 'IP college'> into PERSON

Violated constraint: - Domain constraint

Reason: - value of PERSON_ID is given a string which is not valid.

 

(4)     Insert <10, 'Anu', 25, 'Patpatganj'> into PERSON

Violated constraint: - None

Note: In all first three cases of constraint violations above DBMS could decline the insertion.

Posted Date: 3/6/2013 5:37:47 AM | Location : United States







Related Discussions:- Cases of constraint violations, Assignment Help, Ask Question on Cases of constraint violations, Get Answer, Expert's Help, Cases of constraint violations Discussions

Write discussion on Cases of constraint violations
Your posts are moderated
Related Questions
Explain Candidate key? Candidate Key - A candidate key is a minimal superkey, that can be used to uniquely identify a tuple in the relation.

Consider a database schema consisting of four relations, whose schemas are: Product (maker, model, type) PC (model, speed, ram, hd, price) Laptop (model, speed, ram, hd, s

Explain outer join? Outer Join - If there are any values in one table which do not have corresponding value(s) in the other, in an equi-join which will not be chosen. Such ro

What are the two integrity rules?  Ans:  The two integrity rules are: Entity Integrity Rule & Referential Integrity Rule.   Entity Integrity Rule - If the attribute A of rel

Aggregation Aggregation is stronger form of association. It represents the "has-a" or "part-of" relationship. An aggregation association depicts a complex object which is comp

what is the need of a log in dbms

What are the components of storage manager? The storage manager components include a) Authorization and integrity manager b) Transaction manager c) Buffer manager d

Explain the term - Adjustment of inheritance The inheritance can be enlarged as object design progresses by changing class structure. The designer should do: i) Adjust or r

What is Asterisk in SQL? Asterisk (*): In SQL, the columns for all the tables and views in the FROM clause will be displayed.

Authorisation Authorisation is the culmination of the administrative policies of the organisation.  As the name shows, authorisation is a set of rules that can be used to verif