Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Integrity Constraints Consider the following relational schema. An employee can work in more than one department; the act time field of the Works relation shows

image text in transcribed

Integrity Constraints Consider the following relational schema. An employee can work in more than one department; the act time field of the Works relation shows the percentage of time that a given employee works in a given department. Empleid, integer, ename; string, age: integer, salary: real) Works(eid; integer, did: integer, pct time: integer) Dept(did: integer, budget: real, managerid; integer) Write SQL integrity constraints (domain, key, foreign key, or CHECK constraints; or assertions) or SQL triggers to ensure each of the following requirements, considered independently. 1. Employees must make a minimum salary of $1000. 2. Every manager must be also be an employee. 3. The total percentage of all appointments for an employee must be under 100%. 4. A manager must always have a higher salary than any employee that he or she manages. 5. Whenever an employee is given a raise, the manager's salary must be increased to be at least as much. 6. Whenever an employee is given a raise, the manager's salary must be increased to be at least as much Further, whenever an employee is given a raise, the department's budget must be increased to be greater than the sum of salaries of all employees in the department

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 Fundamentals Study Guide

Authors: Dr. Sergio Pisano

1st Edition

B09K1WW84J, 979-8985115307

More Books

Students also viewed these Databases questions

Question

Dont off er e-mail communication if you arent going to respond.

Answered: 1 week ago