Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me with this database questions.(relational algebra). Please don't write this in SQL, but in this form concat(Fname, Lname)->fullname,Bdate,Sex Super_ssn=333445555 (Employee) thank you

image text in transcribed

Please help me with this database questions.(relational algebra). Please don't write this in SQL, but in this form "concat(Fname, Lname)->fullname,Bdate,Sex Super_ssn=333445555 (Employee)"thank you

1. First and last name of employees supervised by Franklin Wong

2. SSN of all employees who have worked on a project that is controlled by a department different than the department that they are assigned to. Hint Use != comparison

3. List all employees and their dependents (if any)

4. Show the SSN of all employees who are not married. Hint Project SSN from employee and from Dependents for spouse relationship, then use difference operator.

5. Identify Sons and Daughters. Provide two answers.

a) Solve via Union

b) Solve using OR condition

Which has a simpler query plan?

6. List the SSN of employees that are working on projects in both Houston and Sugarland. Avoid using AND or OR. Use a set operation.

EMPLOYEE Ssn Fname Minit Lname John Franklin T Wong333445555 1955-12-08 638 Voss, Houston, TX M 40000 888665555 5 Alicia JZelaya 999887777 1968-01-19 3321 Castle, Spring, TX F 25000 987654321 4 JenniferS Wallace 987654321 1941-06-20 291 Berry, Bellaire, TX F 43000 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 F 25000 3334455555 AhmadVJabbar 987987987 1969-03-29 980 Dallas, Houston, TX M 25000 987654321 4 James E Borg 888665555 1937-11-10 450 Stone, Houston, TX M 55000 NULL Sex Salary Super ssn Dno B Smith 23456789 1965-01-09 731 Fondren, Houston, TX M 30000 333445555 5 Bdate Address DEPARTMENT DEPT LOCATIONS Mgr_start date 1988-05-22 1995-01-01 1981-06-19 ssn Research 5 Houston 333445555 987654321 888665555 Stafford Headquarters Houston WORKS ON PROJECT Pno Hours Pnumber Plocation Dnum Essn 123456789 123456789 666884444 453453453 453453453 333445555 333445555 333445555 333445555 999887777 999887777 987987987 987987987 987654321 987654321 888665555 32.5 7.5 40.0 20.0 20.0 10.0 10.0 10.0 10.0 30 30.0 10.0 10 35.0 5.0 20.0 15.0 ProductY 2Sugarland5 Houston Stafford 5 Computerization 10 S 20 Houston 30 Stafford 10 DEPENDENT 20 name Sex Bdate Relationship 30 30 20 20 NULL 333445555 Alice 333445555Theodore 333445555 Joy 987654321 123456789 Michael 123456789 123456789 Elizabeth F 1986-04-05Daughter M 1983-10-25 Sor F 1958-05-03Spouse M 1942-02-28 Spouse M 1988-01-04 Son F 1988-12-30 Daughter F 1967-05 05 Spouse Alice

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

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

3rd Edition

0760049041, 978-0760049044

More Books

Students also viewed these Databases questions

Question

=+3. Why do you trust (or distrust) this individual?

Answered: 1 week ago