Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Database systems 5. (20 POINTS- 2 POINTS each) Given an arbitrary state of a COM

ID: 3891336 • Letter: D

Question

Database systems

5. (20 POINTS- 2 POINTS each) Given an arbitrary state of a COMPANY database as EMPLOYEE Fname Minit Lname Address Sex Salary Super_ssn Dno B Smith 123456789 1965-01-09 731 Fondren, Houston, TX M 30000 333445555 5 0 FranklinT Wong 333445555 1955-12-08 638 Voss, Houston, TX M 40000 888665555 5 Alicia JZelaya 999887777 1968-01-19 3321 Castle, Spring, X F 25000 9876543214 Jennifer S Wallace 987654321 1941-06-20 291 Berry, Bellaire, TX F43000 888665555 4 Ramesh K Narayan 666884444 1962-09-15 975 Fire Oak, Humble, TX M 38000 333445555 5 Joyce A English 453453453 1972-07-31 5631 Rice, Houston, TX F25000 333445555 5 AhmadVJabbar 9879879871969-03-29 980 Dallas, Houston, TX M 25000 987654321 4 James E Borg 888665555 1937-11-10 450 Stone, Houston, TXM 55000 NULL 0 DEPARTMENT DEPT LOCATIONS Dnumber Dnumber Dlocation Mgr ssn 333445555 987654321 888665555 Mgr start date 1988-05-22 1995-01-01 1981-06-19 Research Stafford 3

Explanation / Answer

HI Student,

Please find all the queries below :

1.Insert into EMPLOYEE values ('Robert','F','Scott','943775543','21-JUN-42','2365 Newcastle Rd,Bellaire,TX',M,58000,'999665555',1);

2.Insert into PROJECT values ('ProductA',4,'Bellaure',2);

3.Insert into DEPARTMENT values ('Production',4,'9437775543','01-OCT-88');

4.INSERT into WORKS_ON values ('677678989',null,'40.0');

5.DELETE FROM WORKS_ON WHERE ESSN='333445555';
6.DELETE FROM EMPLOYEE WHERE SSN='987654321';
7.DELETE FROM PROJECT WHERE PNAME='ProductX';


8.UPDATE DEPARTMENT SET MGRSSN='123456789' AND MGRSTARTDATE='01-OCT-88' WHERE DNUMBER=5;

9.UPDATE EMPLOYEE SET SUPERSSN='943775543' WHERE SSN='9988777'

10,UPDATE WORKD_ON SET HOURS = '5.0' WHERE ESSN='9988777';

If you like this answer, give a thumbsup! Happy Learning :)