Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. (8.5 points) Use Oracle SQL to create a script file that declares relation schemas based on the following assumptions, and then inserts data records

image text in transcribed
1. (8.5 points) Use Oracle SQL to create a script file that declares relation schemas based on the following assumptions, and then inserts data records into the relations. a) Different departments have different names. b) A department may temporarily have no manager. c) Different employees may have the same name. An employee can be uniquely identified by the ID. d) People who work in the HR department always earn at least 20,000 dollars. e) When deleting a record of an employee who is a manager, the manager ID field of the department the person works for should be set to null. f) When deleting a record of a department, the deptName field of all employees who work in that department should be set to null. g) When changing the name of a department in relation Department, values of attribute deptName in table Employee will also be changed accordingly. For example, if 'RD' is changed to 'RESEARCH' in relation Department, all occurrences of ' RD' in in table Employee will also to be automatically changed to 'RESEARCH'. Nenartmant Note: All necessary integrity constraints must be declared before any actual data is inserted into the relations. Hint: - You can add a certain constraint to a relation schema after the schema is defined. - You can insert tuples into relation Department using NULL as values of attribute managerID, and later change NULI to the IDs of assigned managers

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

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago