EMPLOYEE FNAME MINIT John Franklin Alicia Alicia Jennifer Ramesh DEPARTMENT WORKS ON Joyce Ahmad James DEPENDENT...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
EMPLOYEE FNAME MINIT John Franklin Alicia Alicia Jennifer Ramesh DEPARTMENT WORKS ON Joyce Ahmad James DEPENDENT ESSN 123456789 123456789 666884444 453453453 453453453 453453453 433430490 333445555 300-440000 B T DNAME Research Administration Headquarters 333445555 JOH10000 333445555 COOHOOO 333445555 000110000 999887777 cocodr 999887777 90000mm 987987987 987987987 987654321 987654321 E ESSN 333445555 333445555 333445555 987654321 123456789 123456789 123456789 Narayan English Jabbar Borg 2 3 3 1 4 2 4 2 3 2 LNAME Smith Wong Zelaya Wallace PNO HOURS 32.5 10 10 20 cu 30 SU 10 10 30 30 20 7.5 40.0 40.0 20.0 20.0 20.0 DNUMBER MGRSSN 5 333445555 4 987654321 1 888665555 10.0 10:0 10.0 10:0 SSN 123456789 333445555 10.0 Loke 10.0 100 30.0 10.0 35.0 5.0 20.0 15.0 999887777 999887777 987654321 666884444 1968-07-19 1941-06-20 1962-09-15 1972-07-31 987987987 1969-03-29 888665555 1937-11-10 453453453 BDATE 1965-01-09 1955-12-08 Alice Theodore Joy Abner Michael Alice Elizabeth PROJECT DEPENDENT NAME SEX F M F M M F F ADDRESS 731 Fondren, Houston, TX 638 Voss, Houston, TX 3321 Castle, Spring, TX 291 Berry, Bellaire, TX 975 Fire Oak, Humble, TX 5631 Rice, Houston, TX 980 Dallas, Houston, TX 450 Stone, Houston, TX DEPT LOCATIONS MGRSTARTDATE 1988-05-22 1995-01-01 1981-06-19 BDATE 1986-04-05 1983-10-25 1958-05-03 1942-02-28 1988-01-04 1988-12-30 1967-05-05 PNAME ProductX ProductY ProductZ Computerization Reorganization Newbenefits RELATIONSHIP DAUGHTER SON SPOUSE SPOUSE SON DAUGHTER SPOUSE SEX M L F F M M PNUMBER 1 2 3 10 20 30 SALARY 30000 40000 25000 43000 38000 25000 25000 55000 DNUMBER 1 4 5 5 SUPERSSN DNO 333445555 5 888665555 5 4 987654321 888665555 4 333445555 333445555 987654321 mull DLOCATION Houston Stafford Bellaire Sugarland Houston PLOCATION Bellaire Sugarland Houston Stafford Houston Stafford DNUM 5 5 4 1 4 4 1 Specify the following queries on the database schema shown in above Figure using the relational algebra discussed in class. This is not asking you to write SQL queries. 1. Retrieve the names of employees who work on the 'ProductZ' project. 2. Find the names of employees that works for 'Administration' department 3. Retrieve the names of department managers whose department controls 'ProductZ' project. 4. Retrieve the names of employees who do not work on any project. (An employee does not work on any project if his/her ssn is not in works_on) 5. Find the names and addresses of employees who work on at least one project located in Stafford. 6. List the last names of female employees who have no dependents. 7. Find the average salary of all female employees who works for 'Administration' department 8. For each department, list the department name and the total number of project controlled by the department. 9. Retrieve the names of employees who work on every project controlled by department 5 10. For each employee, retrieve employee's name, and the total hours working in projects EMPLOYEE FNAME MINIT John Franklin Alicia Alicia Jennifer Ramesh DEPARTMENT WORKS ON Joyce Ahmad James DEPENDENT ESSN 123456789 123456789 666884444 453453453 453453453 453453453 433430490 333445555 300-440000 B T DNAME Research Administration Headquarters 333445555 JOH10000 333445555 COOHOOO 333445555 000110000 999887777 cocodr 999887777 90000mm 987987987 987987987 987654321 987654321 E ESSN 333445555 333445555 333445555 987654321 123456789 123456789 123456789 Narayan English Jabbar Borg 2 3 3 1 4 2 4 2 3 2 LNAME Smith Wong Zelaya Wallace PNO HOURS 32.5 10 10 20 cu 30 SU 10 10 30 30 20 7.5 40.0 40.0 20.0 20.0 20.0 DNUMBER MGRSSN 5 333445555 4 987654321 1 888665555 10.0 10:0 10.0 10:0 SSN 123456789 333445555 10.0 Loke 10.0 100 30.0 10.0 35.0 5.0 20.0 15.0 999887777 999887777 987654321 666884444 1968-07-19 1941-06-20 1962-09-15 1972-07-31 987987987 1969-03-29 888665555 1937-11-10 453453453 BDATE 1965-01-09 1955-12-08 Alice Theodore Joy Abner Michael Alice Elizabeth PROJECT DEPENDENT NAME SEX F M F M M F F ADDRESS 731 Fondren, Houston, TX 638 Voss, Houston, TX 3321 Castle, Spring, TX 291 Berry, Bellaire, TX 975 Fire Oak, Humble, TX 5631 Rice, Houston, TX 980 Dallas, Houston, TX 450 Stone, Houston, TX DEPT LOCATIONS MGRSTARTDATE 1988-05-22 1995-01-01 1981-06-19 BDATE 1986-04-05 1983-10-25 1958-05-03 1942-02-28 1988-01-04 1988-12-30 1967-05-05 PNAME ProductX ProductY ProductZ Computerization Reorganization Newbenefits RELATIONSHIP DAUGHTER SON SPOUSE SPOUSE SON DAUGHTER SPOUSE SEX M L F F M M PNUMBER 1 2 3 10 20 30 SALARY 30000 40000 25000 43000 38000 25000 25000 55000 DNUMBER 1 4 5 5 SUPERSSN DNO 333445555 5 888665555 5 4 987654321 888665555 4 333445555 333445555 987654321 mull DLOCATION Houston Stafford Bellaire Sugarland Houston PLOCATION Bellaire Sugarland Houston Stafford Houston Stafford DNUM 5 5 4 1 4 4 1 Specify the following queries on the database schema shown in above Figure using the relational algebra discussed in class. This is not asking you to write SQL queries. 1. Retrieve the names of employees who work on the 'ProductZ' project. 2. Find the names of employees that works for 'Administration' department 3. Retrieve the names of department managers whose department controls 'ProductZ' project. 4. Retrieve the names of employees who do not work on any project. (An employee does not work on any project if his/her ssn is not in works_on) 5. Find the names and addresses of employees who work on at least one project located in Stafford. 6. List the last names of female employees who have no dependents. 7. Find the average salary of all female employees who works for 'Administration' department 8. For each department, list the department name and the total number of project controlled by the department. 9. Retrieve the names of employees who work on every project controlled by department 5 10. For each employee, retrieve employee's name, and the total hours working in projects
Expert Answer:
Answer rating: 100% (QA)
9 RELATIONAL ALGEBRA QUERY dnum COUNTpnumber EXPLANATION Her... View the full answer
Related Book For
Fundamentals Of Database Systems
ISBN: 9780133970777
7th Edition
Authors: Ramez Elmasri, Shamkant Navathe
Posted Date:
Students also viewed these programming questions
-
What is a brand, how is it identified, how is it codified, how is it developed and what values should it reflect? Illustrate with an example what is described in the definitions.
-
Which of the following is not a universal rule for achieving internal control over cash? A) Separate recordkeeping from accounting for cash to the extent possible. B) Deposit each day's cash receipts...
-
Consider the COMPANY database described in Figure 5.6. Using the syntax of Oracle triggers, write active rules to do the following: a. Whenever an employees project assignments are changed, check if...
-
Greety Food in Ashland, Kentucky, manufactures and markets snack foods. Sita Lee manages the company's fleet of 220 delivery trucks. Lee has been charged with *reengineering* the fleet-management...
-
The disk of mass mo rests on the surface for which the coefficient of static friction is A Determine the largest couple moment M that can be applied to the bar without causing motion. Given: mo = 45...
-
Compare and contrast psychoanalytic counseling and psychodynamic counseling. Give three examples of applying psychoanalytic counseling to children or adolescents.
-
Exercise 3.58 describes a study in which college students found it unpleasant to sit alone and think. The same article describes a second study in which college students appear to prefer receiving an...
-
On January 1, 2012, Alpha acquired 80 percent of Delta. Of Delta's total business fair value, $125,000 was allocated to copyrights with a 20-year remaining life. Subsequently, on January 1, 2013,...
-
Portland Manufacturing had the following data for the period just ended: Work in process, January 1 Work in process, December 31 Finished goods, January 1 Finished goods, December 31 Direct materials...
-
During 2018, Mings Book Store paid $486,000 for land and built a store in Naperville, Illinois. Prior to construction, the city of Naperville charged Mings $1,000 for a building permit, which Mings...
-
An articulated robot loads and unloads a CNC machine tool. The cell is sched- uled to produce a batch of 300 parts. Setting up the cell for this part style takes 30 min, programming the robot takes...
-
Repeat the preceding exercise using these letters: RAWHOR. Express all probabilities as fractions
-
When randomly selecting items, if successive selections are made with replacement of previously selected items, which of the five rules of this section apply: (1) fundamental counting rule; (2)...
-
A secretary types 10 different letters and addresses 10 corresponding envelopes. If he is in a hurry and randomly inserts the letters into the envelopes, what is the probability that exactly 9 of the...
-
The winning numbers for the current California Fantasy 5 lottery are 13, 18, 22, 24, and 32 in any order. Do calculations for winning this lottery involve permutations or combinations? Why?
-
Assume that 400 births are randomly selected. Use subjective judgment to determine whether the given outcome is unlikely, and also determine whether it is unusual in the sense that the result is far...
-
Data by itself is not useful unless itis -----------------------------. A. massive B. processed to obtain information C. collected from multiple resources D. poorly stated
-
Pappa's Appliances uses the periodic inventory system. Details regarding the inventory of appliances at January 1, purchases invoices during the year, and the inventory count at December 31 are...
-
What are the before image (BFIM) and after image (AFIM) of a data item? What is the difference between in-place updating and shadowing, with respect to their handling of BFIM and AFIM?
-
Define the following terms with respect to the domain calculus: domain variable, range relation, atom, formula, and expression.
-
Compare parallel relational DBMSs and the MapReduce/Hadoop systems.
-
Use the technique discussed in Section9.4 to develop a GEE approach for zeroinflated Poisson model for count responses in longitudinal studies. Section9.4: 9.4 Marginal Models for Longitudinal Data...
-
A U.S. Treasury bond pays a 7% coupon on January 7 and July 7. How much interest accrues per \($100\) of principal to the bond holder between July 7, 2013, and August 9, 2013? How would your answer...
-
The price of a non-dividend paying stock is \($19\) and the price of a three-month European call option on the stock with a strike price of \($20\) is \($1.\) The risk-free rate is 4% per annum. What...
Study smarter with the SolutionInn App