Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Supervision V & Employee Department PK Dnumber +---- ---- Works-fer--------------- PK Ssn Dname Fname Minit Lname Sex Bdate Address Salary Dnumber Super SSN FH------- Works

image text in transcribedimage text in transcribed

Supervision V & Employee Department PK Dnumber +---- ---- Works-fer--------------- PK Ssn Dname Fname Minit Lname Sex Bdate Address Salary Dnumber Super SSN FH------- Works on PK,FK2 Pnumber +PK,FK1 Ssn Worker FK1 FK2 Controls Hours Project ----O PK Pnumber Projeet FK1 Plocation Dnumber Pname Part C: DML commands. Write the DML commands for the following problems. Execute the commands. Note that certain commands will create error messages. You do not have to correct those errors. Just capture all the output from Oracle. If the command is successful, issue ROLLBACK command to undo the update. If the command is not successful, EXPLAIN in words why the command causes an error. (C1) Try to insert the following data. What happens? into EMPLOYEE. (C2) Delete the following employee. What happens? Explain. The EMPLOYEE tuple with SSN = "999887777' \C3) Delete the following employee. What happens? Explain. The EMPLOYEE tuple with SSN = 333445555' (C4) Give a 15 % raise to all the employees who work for the project called "ProductZ". Use only one SQL command. (Hint: use a SQL query inside your UPDATE command) (C5) Alicia Zelaya works for the Research department from today. Use only one command. (Hint: use a subquery) Supervision V & Employee Department PK Dnumber +---- ---- Works-fer--------------- PK Ssn Dname Fname Minit Lname Sex Bdate Address Salary Dnumber Super SSN FH------- Works on PK,FK2 Pnumber +PK,FK1 Ssn Worker FK1 FK2 Controls Hours Project ----O PK Pnumber Projeet FK1 Plocation Dnumber Pname Part C: DML commands. Write the DML commands for the following problems. Execute the commands. Note that certain commands will create error messages. You do not have to correct those errors. Just capture all the output from Oracle. If the command is successful, issue ROLLBACK command to undo the update. If the command is not successful, EXPLAIN in words why the command causes an error. (C1) Try to insert the following data. What happens? into EMPLOYEE. (C2) Delete the following employee. What happens? Explain. The EMPLOYEE tuple with SSN = "999887777' \C3) Delete the following employee. What happens? Explain. The EMPLOYEE tuple with SSN = 333445555' (C4) Give a 15 % raise to all the employees who work for the project called "ProductZ". Use only one SQL command. (Hint: use a SQL query inside your UPDATE command) (C5) Alicia Zelaya works for the Research department from today. Use only one command. (Hint: use a subquery)

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

More Books

Students also viewed these Databases questions

Question

Describe how stress makes us more vulnerable to disease.

Answered: 1 week ago

Question

What magazine and ads did you choose to examine?

Answered: 1 week ago