Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLease Help Submission Guidelines Type your answers in a Word document and upload it in the blackboard. Assignment must be completed individually. Penalty for Late

PLease Help

image text in transcribed

Submission Guidelines Type your answers in a Word document and upload it in the blackboard. Assignment must be completed individually. Penalty for Late Submission Description of Homework For each question below, provide solution for DBMS of your choice (Oracle or Microsoft SQL Server) as shown in class. So, your answer must contain the following: SQL command Output from DBMS (Oracle or Microsoft SQL Server) 1. Create the database for following relational schema with Employee, Department, and Works tables: Employee(eid: integer, ename: string, age: integer, salary: real) Works(eid: integer, did: integer, hours: integer) Department (did: integer, dname: string, budget: real, managerid: integer) Define a table constraint on Department that will ensure that managerid is always positive and less than 1000. Insert the following records in the database: Get the sorted list of name and budget of each department in which employee Jones works. Get the name and id of youngest employee in Research department. Create a view that shows the eids and managerids in Sales department. Add a column called numHours to the Employee table. Use the UPDATE command to insert values into this new column to correspond to the current information in the Works table. Write a trigger that will increment the new field num Hours in the Employee table automatically whenever a record is inserted in the Works table. Write a trigger that will decrement the new field numHours in the Employee table

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

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

9th Edition

0135188148, 978-0135188149, 9781642087611

More Books

Students also viewed these Databases questions

Question

What would be a constraint for project to move employees to remote

Answered: 1 week ago

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago