a. Insert <‘ProductA’, 4, ‘Bellaire’, 2> into PROJECT. b. Insert <‘Production’,
ID: 671138 • Letter: A
Question
a. Insert <‘ProductA’, 4, ‘Bellaire’, 2> into PROJECT.
b. Insert <‘Production’, 4, ‘943775543’, ‘2007-10-01’> into DEPARTMENT.
c. Delete the EMPLOYEE tuple with Ssn = ‘987654321’.
d. Modify the Mgr_ssn and Mgr_start_date of the DEPARTMENT tuple with Dnumber = 5 to ‘123456789’ and ‘2007-10-01’, respectively.
e. Modify the Super_ssn attribute of the EMPLOYEE tuple with Ssn= ‘999887777’ to ‘943775543’.
Figure 3.6 One possible database state for the COMPANY relational database schema. EMPLOYEE Fname Minit Lname Bdate Sex Salary Super_ssn Dno B Smith 123456789 1965-01-09 731 Fondren, Houston, TX M 30000 333445555 5 FranklinT Wong 333445555 1955-12-08 638 Voss, Houston, TXM40000 888665555 5 JZelaya 999887777 1968-01-19 3321 Castle, Spring, TXF 25000 987654321 4 Jennifer S Wallace 987654321 1941-06-20 291 Berry, Bellaire, TXF 43000 8886655554 Ramesh K Narayan 666884444 1962-09-15 975 Fire Oak, Humble, TX M 38000 333445555 5 JoyceA English453453453 1972-07-31 5631 Rice, Houston, TX F 25000 333445555 5 AhmadV Jabbar 9879879871969-03-29 980 Dallas, Houston, TX M 25000 9876543214 JamesE Borg 888665555 1937-11-10450 Stone, Houston, TX M 55000 NULL DEPARTMENT DEPT LOCATIONS Dnumber 5 4 Dnumber 333445555 987654321 888665555 Mgr start date 1988-05-22 1995-01-01 1981-06-19 Dlocation Houston Stafford Bellaire Research Administration 5 Houston WORKS ON PROJECT Pno Hours Pname Pnumber Plocation 123456789 123456789 666884444 453453453 453453453 333445555 333445555 333445555 333445555 999887777 999887777 987987987 987987987 987654321 987654321 888665555 32.5 Bellaire 5 5 5 4 ProductY Houston Computerizaton10 Stafford Houston Stafford 40.0 20.0 20.0 10.0 10.0 10.0 10.0 30.0 10.0 35.0 nization 20 30 4 DEPENDENT Dependent name Sex Bdate 30 333445555 333445555 Theodore 333445555 Joy 987654321 123456789 123456789 123456789 Elizabeth F 1986-04-05Daughter M 1983-10-25 Son F 1958-05-03 Spouse M 1942-02-28Spouse M 1988-01-04 Son F 1988-12-30 Daughter F 1967-05-05Spouse Alice 30 30 20 20 20.0 15.0 NULL Michael AliceExplanation / Answer
a)
INSERT INTO PROJECT
VALUES ('ProductA', 4, 'Bellaire', 2)
b)
INSERT INTO DEPARTMENT
VALUES ('Production', 4, '943775543', '01-OCT-88')
c)
DELETE FROM EMPLOYEE
WHERE SSN= '987654321'
d)
UPDATE DEPARTMENT
SET MGRSSN = '123456789', MGRSTARTDATE = '01-OCT-88'
WHERE DNUMBER= 5
e)
UPDATE EMPLOYEE
SET SUPERSSN = '943775543'
WHERE SSN= '999887777'
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.