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
What is the function of a Domain? A domain defines the technical settings of a table field. A domain describes a value range, which sets the permissible data values for the

What is the difference between the function module and a normal ABAP/4 subroutine? In contrast to normal subroutines function modules have uniquely exact interface.  Declaring da

Describe the advantage of State chart Diagram A state chart represents a state machine, emphasizing flow of control from one state to other. A state machine is a behaviour whi

Update Anomaly : This anomaly is occurred due to data redundancy. Redundant information makes updates more complex since, for example, varying the name of the instructor of MCS-014

Define and differentiate between ordered indexing and hashing. Ans: Ordered indexing: To gain fast random access to records in a file, we can make of an index structure. Every

Draw an entity relationship diagram (ERD) for the following situation: A company has a number of employees. Each employee is identified by an Employee_Id. The company wants to st

Consider the relations EMP(ENO,ENAME,AGE,BASIC_SALARY) WORK_IN(ENO,DNO) DEPT(DNO,DNAME,CITY) Express the following queries in SQL (i) Find names of employees who work in a dep

Problem: You are given the following schema 1. Flights(flno, from, to, distance) 2. Aircraft(aid, flno, aname, cruisingRange) 3. Certified(eid, aid) 4. Employees(eid, ena

What is a heterogeneous distributed database? In a heterogeneous distributed database, dissimilar sites may use different schemas, and dissimilar dbms s/w. The sites may not be

Explain the concept of Modeling With Objects A model is a conceptual representation of a specification, design or system from a particular point of view. A modelling language