ΕMPLOYΕΕ Sex Salary Super_ssn Dno 30000 333445555 40000 888665555 Fname Minit Lname Ssn Bdate Address 123456789 1965-01-09 731 Fondren, Houston, TX M 333445555 1955-12-08 638 Voss, Houston, TX...


Relational Algebra


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.


- 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.


ΕMPLOYΕΕ<br>Sex Salary Super_ssn Dno<br>30000 333445555<br>40000 888665555<br>Fname<br>Minit<br>Lname<br>Ssn<br>Bdate<br>Address<br>123456789 1965-01-09 731 Fondren, Houston, TX M<br>333445555 1955-12-08 638 Voss, Houston, TX<br>999887777 1968-01-19 3321 Castle, Spring, TX<br>John<br>B<br>Smith<br>5<br>Franklin<br>Wong<br>M<br>F<br>Wallace 987654321 1941-06-20 291 Berry, Bellaire, TX<br>Narayan 666884444 1962-09-15975 Fire Oak, Humble, TX M<br>English 453453453 1972-07-31 5631 Rice, Houston, TX<br>987987987 1969-03-29 980 Dallas, Houston, TX<br>888665555 1937-11-10 450 Stone, Houston, TX<br>Alicia<br>Zelaya<br>25000 987654321<br>4<br>Jennifer<br>43000 888665555<br>4<br>Ramesh<br>K<br>38000 333445555<br>5<br>F 25000 333445555<br>M 25000 987654321<br>M 55000 NULL<br>Joyce<br>A<br>Ahmad<br>V<br>Jabbar<br>4<br>E Borg<br>James<br>DEPT LOCATIONS<br>DEPARTMENT<br>Dname<br>Dnumber<br>Mgr_ssn<br>Mgr_start_date<br>Dnumber<br>Dlocation<br>Research<br>333445555<br>1988-05-22<br>Houston<br>Administration<br>4<br>Stafford<br>4<br>987654321<br>1995-01-01<br>Headquarters<br>1<br>888665555<br>1981-06-19<br>Bellaire<br>Sugarland<br>Houston<br>WORKS ON<br>PROJECT<br>Essn<br>Pno<br>Hours<br>Pname<br>Pnumber<br>Plocation<br>Dnum<br>123456789<br>32.5<br>ProductX<br>Bellaire<br>123456789<br>ProductY<br>Sugarland<br>7.5<br>2<br>5<br>666884444<br>3<br>40.0<br>Productz<br>3<br>Houston<br>5<br>453453453<br>1<br>20.0<br>Computerization<br>10<br>Stafford<br>4<br>Reorganization<br>Newbenefits<br>453453453<br>20.0<br>20<br>Houston<br>1<br>333445555<br>2<br>10.0<br>30<br>Stafford<br>4<br>333445555<br>3<br>20.0<br>333445555<br>10<br>10.0<br>DEPENDENT<br>333445555<br>20<br>10.0<br>Relationship<br>1986-04-05| Daughter<br>Essn<br>Dependent_name<br>Sex<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>987987987<br>10<br>35.0<br>333445555<br>Joy<br>1958-05-03<br>Spouse<br>987987987<br>30<br>5.0<br>Abner<br>Spouse<br>987654321<br>1942-02-28<br>987654321<br>30<br>20.0<br>123456789<br>Michael<br>M<br>1988-01-04<br>Son<br>987654321<br>20<br>15.0<br>123456789<br>Alice<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: ΕMPLOYΕΕ Sex Salary Super_ssn Dno 30000 333445555 40000 888665555 Fname Minit Lname Ssn Bdate Address 123456789 1965-01-09 731 Fondren, Houston, TX M 333445555 1955-12-08 638 Voss, Houston, TX 999887777 1968-01-19 3321 Castle, Spring, TX John B Smith 5 Franklin Wong M F Wallace 987654321 1941-06-20 291 Berry, Bellaire, TX Narayan 666884444 1962-09-15975 Fire Oak, Humble, TX M English 453453453 1972-07-31 5631 Rice, Houston, TX 987987987 1969-03-29 980 Dallas, Houston, TX 888665555 1937-11-10 450 Stone, Houston, TX Alicia Zelaya 25000 987654321 4 Jennifer 43000 888665555 4 Ramesh K 38000 333445555 5 F 25000 333445555 M 25000 987654321 M 55000 NULL Joyce A Ahmad V Jabbar 4 E Borg James DEPT LOCATIONS DEPARTMENT Dname Dnumber Mgr_ssn Mgr_start_date Dnumber Dlocation Research 333445555 1988-05-22 Houston Administration 4 Stafford 4 987654321 1995-01-01 Headquarters 1 888665555 1981-06-19 Bellaire Sugarland Houston WORKS ON PROJECT Essn Pno Hours Pname Pnumber Plocation Dnum 123456789 32.5 ProductX Bellaire 123456789 ProductY Sugarland 7.5 2 5 666884444 3 40.0 Productz 3 Houston 5 453453453 1 20.0 Computerization 10 Stafford 4 Reorganization Newbenefits 453453453 20.0 20 Houston 1 333445555 2 10.0 30 Stafford 4 333445555 3 20.0 333445555 10 10.0 DEPENDENT 333445555 20 10.0 Relationship 1986-04-05| Daughter Essn Dependent_name Sex Bdate 999887777 30 30.0 333445555 Alice F 999887777 10 10.0 333445555 Theodore M 1983-10-25 Son 987987987 10 35.0 333445555 Joy 1958-05-03 Spouse 987987987 30 5.0 Abner Spouse 987654321 1942-02-28 987654321 30 20.0 123456789 Michael M 1988-01-04 Son 987654321 20 15.0 123456789 Alice 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