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

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!