Question: Problem 2. (Based on Exercise 5.10) [50 pts] Consider again the following relational schema. An employee can work in more than one department; the pct

 Problem 2. (Based on Exercise 5.10) [50 pts] Consider again the

Problem 2. (Based on Exercise 5.10) [50 pts] Consider again the following relational schema. An employee can work in more than one department; the pct time field of the Works relation shows the percentage of time that a given employee works in a given department. Emp(eid: integer, ename: string, age: integer, salary: real) Works(eid: integer, did: integer, pct time: integer) Dept(did: integer, dname: string, 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. You have to give the CREATE TABLE statements for each relation and you can modify it to add constraints if needed. 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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!