Question: Using the COMPANY schema, express the following operations in SQL. For your SELECT operations, make sure that they always work without modification even if the

Using the COMPANY schema, express the following operations in SQL. For your SELECT operations, make sure that they always work without modification even if the underlying tables change via insert/update/delete operations.

1. Find the name and date of birth of all dependents having a spouse relationship . (1 point)

Query in SQL:

Query Output:

2. Find the employee first name and the name of his/her dependent(s). (2 points)

Query in SQL:

Query Output:

3. Find the first name, middle initial and last name of all supervisors. (2.5 points)

Query in SQL:

Query Output:

4. Show how you can insert the following row in the DEPARTMENT table using SQL: (1.5 points)

Dname=Maintenance

Dnumber=6

Mgr_ssn=987987987

Mgr_start_date=02-FEB-92

Insert Command:

Screen shot of DEPARTMENT table (to make sure that the department has been inserted):

5. Show how you can double the number of hours for all employees working on project number 10. (1.5 points)

Update Command:

Screen shot of EMPLOYEE table (to make sure that the salaries have been decreased):

6. Using SQL, show how you can delete dependents whose name starts with the letter A and ends with the letter e. (1.5 points)

Delete Command:

Screen shot of DEPENDENT table (to make sure that the dependents have been deleted)

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!