Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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'.
image text in transcribed

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 Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions

Question

What is a star schema? AppendixLO1

Answered: 1 week ago

Question

How did you feel about taking piano lessons as a child? (general)

Answered: 1 week ago