New WORKS_ON tuple to a value of PNUMBER that exists in the PROJECT relation. This constraint by: (i) rejecting the insertion, or (ii) changing the value of PNO in the Violates entity integrityīecause PNO, which is part of the primary key of WORKS_ON, is null. (d) Violates both the entity integrity and referential integrity. Rejecting the insertion, (ii) changing the value of MGRSSN to an existing SSN value inĮMPLOYEE, or (iii) inserting a new EMPLOYEE tuple with SSN='943775543'. Referential integrity because MGRSSN='943775543' and there is no tuple in theĮMPLOYEE relation with SSN='943775543'. In the new DEPARTMENT tuple to a value that does not violate the key constraint. This constraint by: (i) rejecting the insertion, or (ii) changing the value of DNUMBER Violates the key constraintīecause there already exists a DEPARTMENT tuple with DNUMBER=4. (c) Violates both the key constraint and referential integrity. Inserting a new DEPARTMENT tuple with DNUMBER=2. PROJECT tuple to an existing DNUMBER value in the DEPARTMENT relation, or (iii) We may enforce the constraint by: (i) rejecting the insertion of the new PROJECT tuple, (ii) changing the value of DNUM in the new (b) Violates referential integrity because DNUM=2 and there is no tuple in the DEPARTMENT relation with DNUMBER=2. (k) Modify the HOURS attribute of the WORKS_ON tuple with ESSN= '999887777' and
(j) Modify the SUPERSSN attribute of the EMPLOYEE tuple with SSN= '999887777' to (i) Modify the MGRSSN and MGRSTARTDATE of the DEPARTMENT tuple with DNUMBER=5 to '123456789' and '01-OCT-88', respectively. (h) Delete the PROJECT tuple with PNAME= 'ProductX'. (g) Delete the EMPLOYEE tuple with SSN= '987654321'. (f) Delete the WORKS_ON tuples with ESSN= '333445555'.
Discuss all integrity constraints violated by each operation, if any, and the different ways of enforcing these constraints:
SISTEMAS DE BANCO DE DADOS ELMASRI ELMASRI UPDATE
PAGE 1Chapter 3: The Relational Data Model and Relational Database ConstraintsĬHAPTER 3: THE RELATIONAL DATA MODEL AND RELATIONAL DATABASE CONSTRAINTSģ.11 - Suppose each of the following Update operations is applied directly to the database of Figure 3.6. Chapter 5: The Relational Data Model and Relational Database Constraints