Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Database One possible database state for the COMPANY relational database schema. Dno EMPLOYEE Fname Minit John B Franklin T 5 5 Alicia J 4 Jennifer

image text in transcribed

Database One possible database state for the COMPANY relational database schema. Dno EMPLOYEE Fname Minit John B Franklin T 5 5 Alicia J 4 Jennifer Lname San Bdate Address Sex Salary Super_ssn Smith 1234567891965-01-09 731 Fondren, Houston, TX M 30000 333445555 Wong 333445555 1955-12-08 638 Voss, Houston, TX M 40000 888665555 Zelaya 999887777 1968-01-19 3321 Castle, Spring, TX F 25000 987654321 Wallace 987654321 1941-06-20 291 Berry, Bellaire, TX F 43000 888665555 Narayan 666884444 1962-09-15 975 Fire Oak, Humble, TXM 38000 333445555 English 453453453 1972-07-31 5631 Rice, Houston, TX F 25000 333445555 Jabbar 987987987 1969-03-29 980 Dallas, Houston, TX M 25000 987654321 Borg 888665555 1937-11-10 450 Stone, Houston, TX M 55000 NULL 4 S K Ramesh Joyce Ahmad 5 5 4 V E James 1 DEPARTMENT DEPT LOCATIONS Dnumber Dlocation Dname Dnumber Mgr_start_date 1988-05-22 Research Mgr_ssn 333445555 987654321 5 1 4 1995-01-01 4 Administration Headquarters 1 888665555 1981-06-19 5 Houston Stafford Bellaire Sugarland Houston 5 5 PROJECT WORKS ON Essn Pno Hours Pnumber Dnum 1 1 5 123456789 123456789 32.5 7.5 40.0 Pname ProductX ProductY Productz 2 5 3 5 Plocation Bellaire Sugarland Houston Stafford Houston Stafford 20.0 666884444 453453453 453453453 333445555 10 4 20.0 Computerization Reorganization Newbenefits 20 1 10.0 30 4 333445555 3 10.0 333445555 10 10.0 DEPENDENT 333445555 20 10.0 Essn Dependent name Sex Bdate 30 30.0 333445555 Alice F 1986-04-05 999887777 999887777 10 10.0 333445555 M 987987987 Relationship Daughter Son Spouse Spouse Son 10 35.0 Theodore Joy Abner 333445555 1983-10-25 1958-05-03 1942-02-28 F 987987987 30 5.0 987654321 M 30 20.0 Michael M 1988-01-04 987654321 987654321 123456789 123456789 20 15.0 Alice F 1988-12-30 Daughter Spouse 888665555 20 NULL 123456789 Elizabeth F 1967-05-05 8. here is the database example 7. Produce a relation showing the employee first name, name of his/her dependent, and relationship to the employee. (1 point) Find the first and last name of all employees whose salary is above the average. (1 point) Find the first and last name of all employees with no dependents. (1 point) 10. Produce a relation showing the department number and how many locations in each department ordered by the number of locations in descending order. Hint: you must use GROUP BY. (1.25 point) 11. For employees with dependents, produce a relation showing the first and last name of the employee, and the number of dependents he/she has. That is, your query should display this output: (1.25 point) 9. Example: Select the employee first name, last name, and address of all employees in department 5. Query in SQL: SELECT Fname, Lname,Address

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

2nd Edition

0471180742, 978-0471180746

More Books

Students also viewed these Databases questions

Question

2 What supply is and what affects it.

Answered: 1 week ago