Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The problems on the next page require writing SQL scripts for Oracle. You should submit a script for each of these problems in separate text

image text in transcribedimage text in transcribedimage text in transcribed

The problems on the next page require writing SQL scripts for Oracle. You should submit a script for each of these problems in separate text files. Please remember that PDFs and MS Word documents are not text files. The script should be able to be executed with the start command using the version of Oracle provided by IT support. Use two hyphens to begin a single-line comment, or use the C-style syntax (/* ... */) for multi-line comments. 1. Write a script file of SQL statements that will create the tables from Assignment #1. Include the following constraints on the tables. (10 points) The primary key field(s) of each table should be present. The Works relation has two foreign keys. One references Employee and the other references Project. The Salary, Budget, and Hours fields should be restricted to nonnegative values. The Loc field should be restricted to N, S, E, W (unlike Assignment #1) The Manager field is a foreign key referencing Employee (this is a self-reference) . . Relations Note: Each table's primary key is underlined. Works EmplD 101 101 Hours 5 10 Employee EmplD EmpName Dept Salary Manager 101 Alpha HR 200 202 Beta ENGR 250 303 Gamma IT 300 202 404 Delta ENGR 275 202 505 Epsilon HR 325 101 606 Zeta IT 225 404 707 Omega IT 300 303 101 202 202 303 8 ProjiD Red Orange Yellow Green Blue Indigo Violet Red Orange Yellow Green Blue Indigo Violet 303 303 404 404 505 4 7 17 22 505 2 505 Project ProjiD Red Orange Yellow Green Blue Indigo Violet 606 Loc Budget Lead NW 1000 707 NE 1100 707 SW 950 606 SE 900 606 NW 1200 505 SW 1000 404 NW 1150 303

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

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students also viewed these Databases questions