expand icon
book Database Systems 6th Edition by Ramez Elmasri, Shamkant B. Navathe cover

Database Systems 6th Edition by Ramez Elmasri, Shamkant B. Navathe

النسخة 6الرقم المعياري الدولي: 0136086209
book Database Systems 6th Edition by Ramez Elmasri, Shamkant B. Navathe cover

Database Systems 6th Edition by Ramez Elmasri, Shamkant B. Navathe

النسخة 6الرقم المعياري الدولي: 0136086209
تمرين 9
      -Consider the EMPLOYEE table's constraint EMPSUPERFK as specified in Figure 4.2 is changed to read as follows: CONSTRAINT EMPSUPERFK FOREIGN KEY (SUPERSSN) REFERNCES EMPLOYEE(SSN) ON DELETE CASCADE ON UPDATE CASCADE, Answer the following questions:  a. What happens when the following command is run on the database state shown in Figure 3.6?  DELETE EMPLOYEE WHERE LNAME = 'Borg'  b. Is it better to CASCADE or SET NULL in case of EMPSUPERFK constraint ON DELETE?

      -Consider the EMPLOYEE table's constraint EMPSUPERFK as specified in Figure 4.2 is changed to read as follows: CONSTRAINT EMPSUPERFK FOREIGN KEY (SUPERSSN) REFERNCES EMPLOYEE(SSN) ON DELETE CASCADE ON UPDATE CASCADE, Answer the following questions:  a. What happens when the following command is run on the database state shown in Figure 3.6?  DELETE EMPLOYEE WHERE LNAME = 'Borg'  b. Is it better to CASCADE or SET NULL in case of EMPSUPERFK constraint ON DELETE?
-Consider the EMPLOYEE table's constraint EMPSUPERFK as specified in Figure 4.2 is changed to read as follows: CONSTRAINT EMPSUPERFK FOREIGN KEY (SUPERSSN) REFERNCES EMPLOYEE(SSN) ON DELETE CASCADE ON UPDATE CASCADE, Answer the following questions:
a. What happens when the following command is run on the database state shown in Figure 3.6?
DELETE EMPLOYEE WHERE LNAME = 'Borg'
b. Is it better to CASCADE or SET NULL in case of EMPSUPERFK constraint ON DELETE?
التوضيح
موثّق
like image
like image

a) The James E. Borg entry is deleted fr...

close menu
Database Systems 6th Edition by Ramez Elmasri, Shamkant B. Navathe
cross icon