Question
* Only provide SQL code* 1. Use Oracle SQL to create a script file that declares table schema based on the following assumptions, and then
* Only provide SQL code*
1. Use Oracle SQL to create a script file that declares table schema based on the following assumptions, and then inserts data records into the tables.
(a) Different departments have different names.
(b) A department may temporarily have no manager.
(c) Different employees may have the same name.
(d) An employee can work as a manager for at most one department.
(e) People who work in the HR department should earn at least 20,000 dollars.
(f) When deleting a record of an employee who is a manager, the managerID field of the department she/he works for should be set to null.
(g) When deleting a record of a department, the deptName field of all employees who work in that department should be set to null. All constraints must be declared before any actual data is inserted into tables.
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