Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started