Question: Uatabase Management System Design Test 3 Spring 2018 2. (20 points) Consider the EMPLOYEE table's constraint with the name EMPSUPERFK as speci in the Figure

 Uatabase Management System Design Test 3 Spring 2018 2. (20 points)

Uatabase Management System Design Test 3 Spring 2018 2. (20 points) Consider the EMPLOYEE table's constraint with the name EMPSUPERFK as speci in the Figure below CREATE TABLE EMPLOYEE Dno INT PRIMARY KEY (Sen), FOREIGN KEY (Supersan) REFERENCES EMPLOYEEISen) FOREIGN KEY Dno) REFERENCES DEPARTMENT(Dnumber) CONSTRAINT EMPPK NOT NULLDEFAULT 1, CONSTRAINT EMPSUPERFK ON DELETE SET NULL CONSTRAINT EMPDEPTFK ON UPDATE CASCADE, ON DELETE SET DEFAULT ON UPDATE CASCADE) CREATE TABLE DEPARTMENT Mg-sun CHARD) NOT NULL DEFAULT 888665558 CONSTRAINT DEPTPK CONSTRAINT DEPTSK CONSTRAINT DEPTMGRFK PRIMARY KEY(Dnumber). UNIQUE (Dnama), FOREIGN KEY (Mgrn) REFERENCES EMPLOYEE Sam) Figure 4.2 Example Bustrating how delault sttribute values and referential Integrity triggared actions are specified n SOL ON DELETE SET DEFAULT ON UPDATE CASCADE CREATE TABLE DEPT LOCATIONS PRIMARY KEY (Dnumber, Dlocation), FOREIGN KEY (D umber) REFERENCES DEPARTMENT Dnumber) ON DELETE CASCADE ON UPDATE CASCADE is changed to read as follows: CONSTRAINT EMPSUPERFK FOREIGN KEY (Super_ssn) REFERNCES EMPLOYEE (SSN) ON DELETE CASCADE ON UPDATE CASCADE Answer the following questions: a. (10 po ints) What happens when the following command is run on the database state shown in the extra page given during the test? DELETE EMPLOYEE WHERE LNAME Borg b. (10 points) Is it better to CASCADE or SET NULL in the case of the EMPSUPERFK constraint N DELETE above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!