EMPLOYEE Fname Minit Lname Ssn Address Sex Super_ssn Dno Bdate Salary DEPARTMENT Dname Dnumber Mgr_ssn Mgr_start_date DEPT LOCATIONSs Dnumber Dlocation PROJECT Pname Pnumber Plocation Dnum WORKS_ON...


Specify the following queries on the COMPANY relational database schema shown in Figure 3.5, using the relational operators discussed in this chapter. Also show the result of each query as it would apply to the database state of Figure 3.6.


- List the managers who are controlling more than 2 projects.


- List the names of employees all of whose dependents were born before 1990.


- Retrieve the average salary of employees who work totally no less than 30 hours on projects.


EMPLOYEE<br>Fname Minit Lname Ssn<br>Address<br>Sex<br>Super_ssn Dno<br>Bdate<br>Salary<br>DEPARTMENT<br>Dname Dnumber Mgr_ssn Mgr_start_date<br>DEPT LOCATIONSs<br>Dnumber Dlocation<br>PROJECT<br>Pname Pnumber Plocation<br>Dnum<br>WORKS_ON<br>Essn<br>Pno<br>Hours<br>Figure 5.5<br>Schema diagram for the<br>COMPANY relational<br>DEPENDENT<br>Essn<br>Dependent_name Sex<br>Bdate<br>Relationship<br>database schema.<br>

Extracted text: EMPLOYEE Fname Minit Lname Ssn Address Sex Super_ssn Dno Bdate Salary DEPARTMENT Dname Dnumber Mgr_ssn Mgr_start_date DEPT LOCATIONSs Dnumber Dlocation PROJECT Pname Pnumber Plocation Dnum WORKS_ON Essn Pno Hours Figure 5.5 Schema diagram for the COMPANY relational DEPENDENT Essn Dependent_name Sex Bdate Relationship database schema.
Figure 5.6<br>One possible database state for the COMPANY relational database schema<br>EMPLOYEE<br>Fname<br>Super san DnD<br>123456789 1965-01-09 731 Fondren, Houston, TX M 30000 333445555<br>M 40000 888665555<br>Minit<br>Lname<br>San<br>Bdate<br>Addross<br>Sar Salary<br>John<br>B.<br>Smith<br>333445555 1955-12-08 638 Voes, Houston, TX<br>Zelaya 999887ITI 1968-01-19 3321 Castle, Spring, TX<br>Wallace 987654321 1941-06-20 291 Berry, Bellaire, TX<br>Franklin<br>Wong<br>Alicia<br>25000 987654321<br>Jenniler<br>S<br>F<br>43000 888665555<br>Ramesh K Narayan 666884444 1962-09-15 975 Fire Oak, Humble, TX M<br>Joyce<br>English 453453453 1972-07-31 5631 Rice, Houston, TX<br>V Jabbar<br>E Borg<br>38000 333445565<br>F 25000 333445555<br>M 25000 987654321<br>A<br>5<br>Ahmad<br>987987987 1969-03-29 980 Dallas, Houston, TX<br>James<br>888665555 1937-11-10 450 Stone, Houston, TX<br>M 55000 NULL<br>1<br>DEPT LOCATIONS<br>Dlocaion<br>DEPARTMENT<br>Dramber<br>1<br>Drumber<br>Mgr start date<br>Dname<br>Mgr_san<br>Rosearch<br>5<br>333445555<br>1988-05-22<br>Houston<br>Administration<br>4<br>987654321<br>1995-01-01<br>4<br>Stafford<br>Hoadquartors<br>888665555<br>1981-06-19<br>Belaire<br>5<br>Sugarland<br>Houston<br>5<br>WORKS ON<br>PROJECT<br>Essn<br>Pno<br>Hours<br>Phame<br>Pnumber<br>Plocation<br>Dnum<br>123456789<br>1<br>325<br>ProductX<br>Bellaire<br>5<br>123456789<br>2<br>75<br>ProducfY<br>2<br>Sugarland<br>5<br>666884444<br>3.<br>40.0<br>Product<br>3<br>Hounton<br>5<br>453453453<br>20.0<br>Computorization<br>Roorganiration<br>10<br>Stafford<br>4<br>453453453<br>2<br>20.0<br>20<br>Houston<br>1<br>333445555<br>2<br>10.0<br>Newbenelits<br>30<br>Stafford<br>4<br>333445555<br>3<br>10.0<br>333445555<br>10<br>10.0<br>DEPENDENT<br>333445555<br>20<br>10.0<br>Essn<br>Dependent name Sox<br>Relationshp<br>1986 04-05 Daughter<br>Bdate<br>999887777<br>30<br>30.0<br>333445555<br>Alice<br>F<br>999887777<br>10<br>10.0<br>333445555<br>Theodore<br>M<br>1983-10-25<br>Son<br>10<br>35.0<br>1958-05-03 Spoune<br>1942-02-28 Spouse<br>333445555<br>Joy<br>30<br>5.0<br>987654321<br>Abner<br>M<br>987654321<br>30<br>20.0<br>123456789<br>Michael<br>M<br>1988-01-04 Son<br>987654321<br>20<br>15.0<br>123456789<br>Alice<br>F<br>1988-12-30<br>Daughter<br>888665555<br>20<br>NULL<br>123456789<br>Elizabeth<br>F<br>1967-05-05<br>Spouse<br>

Extracted text: Figure 5.6 One possible database state for the COMPANY relational database schema EMPLOYEE Fname Super san DnD 123456789 1965-01-09 731 Fondren, Houston, TX M 30000 333445555 M 40000 888665555 Minit Lname San Bdate Addross Sar Salary John B. Smith 333445555 1955-12-08 638 Voes, Houston, TX Zelaya 999887ITI 1968-01-19 3321 Castle, Spring, TX Wallace 987654321 1941-06-20 291 Berry, Bellaire, TX Franklin Wong Alicia 25000 987654321 Jenniler S F 43000 888665555 Ramesh K Narayan 666884444 1962-09-15 975 Fire Oak, Humble, TX M Joyce English 453453453 1972-07-31 5631 Rice, Houston, TX V Jabbar E Borg 38000 333445565 F 25000 333445555 M 25000 987654321 A 5 Ahmad 987987987 1969-03-29 980 Dallas, Houston, TX James 888665555 1937-11-10 450 Stone, Houston, TX M 55000 NULL 1 DEPT LOCATIONS Dlocaion DEPARTMENT Dramber 1 Drumber Mgr start date Dname Mgr_san Rosearch 5 333445555 1988-05-22 Houston Administration 4 987654321 1995-01-01 4 Stafford Hoadquartors 888665555 1981-06-19 Belaire 5 Sugarland Houston 5 WORKS ON PROJECT Essn Pno Hours Phame Pnumber Plocation Dnum 123456789 1 325 ProductX Bellaire 5 123456789 2 75 ProducfY 2 Sugarland 5 666884444 3. 40.0 Product 3 Hounton 5 453453453 20.0 Computorization Roorganiration 10 Stafford 4 453453453 2 20.0 20 Houston 1 333445555 2 10.0 Newbenelits 30 Stafford 4 333445555 3 10.0 333445555 10 10.0 DEPENDENT 333445555 20 10.0 Essn Dependent name Sox Relationshp 1986 04-05 Daughter Bdate 999887777 30 30.0 333445555 Alice F 999887777 10 10.0 333445555 Theodore M 1983-10-25 Son 10 35.0 1958-05-03 Spoune 1942-02-28 Spouse 333445555 Joy 30 5.0 987654321 Abner M 987654321 30 20.0 123456789 Michael M 1988-01-04 Son 987654321 20 15.0 123456789 Alice F 1988-12-30 Daughter 888665555 20 NULL 123456789 Elizabeth F 1967-05-05 Spouse
Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here