Question: Consider the COMPANY relational database that you designed from Exercise 5 ( or use Exercise 5 solution and create one ) . Specify the following

Consider the COMPANY relational database that you designed from Exercise 5(or use Exercise 5 solution and create one).
Specify the following queries in SQL on the COMPANY database. Show the result of each query.
a. Retrieve the names of all employees in department 5 who work more than 10 hours per week on the 'ProductX' project.
b. List the names of all employees who have a dependent with the same first name as themselves.
c. Find the names of all employees who are directly supervised by 'Franklin Wong'.
Specify the following updates using the SQL update commands. Show the state of each relation after the update.
a. Insert 'Robert','F','Scott','943775543','1972-06-21','2365 Main St, Bellaire, TX',M,58000,'888665555',1> into EMPLOYEE.
b. Insert '453453453','John','M','1990-12-12','spouse'> into DEPENDENT.
c. Delete the WORKS_ON tuples with Essn ='333445555'.
d. Modify the Mgr_ssn and Mgr_start_date of the DEPARTMENT tuple with Dnumber =5 to '123456789' and '2007-10-01', respectively.
e. Modify the Hours attribute of the WORKS_ON tuple with Essn =?'999887777 'and Pno =10 to '5.0'.
 Consider the COMPANY relational database that you designed from Exercise 5(or

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!