Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

* 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

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

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

1st Edition

1597496251, 978-1597496254

More Books

Students also viewed these Databases questions

Question

Did you write a special beginning that makes the reader want more?

Answered: 1 week ago

Question

c. What were you expected to do when you grew up?

Answered: 1 week ago

Question

d. How were you expected to contribute to family life?

Answered: 1 week ago

Question

e. What do you know about your ethnic background?

Answered: 1 week ago