Write a trigger on emp table to ensure the requirement


Emp(eid: numeric, ename: varchar, age: numeric, salary: numeric) Works(eid: numeric, did: numeric, pct_time: numeric)
Dept(did: numeric, budget: numeric, managerid: numeric)

have to create Emp, Works and Dept tables, populate with given data below.gotta write integrity constraints (domain, key, foreign key, or CHECK constraints) to ensure each of the following:

a. Employees must make a minimum salary of $1000.

b. The pct time field of the Works relation shows the percentage of time that a given employee works in a given department and this value cannot be greater than 100.

c. An employee can work in more than one department.

d. Every manager must also be an employee.

Also gotta write triggers to ensure each of the following requirements, considered independently. (I should handle the errors that may occur in your triggers and give at least one insertion (or update) example per question, which will be blocked by the triggers.

a. Write a trigger on Works department to ensure the following requirement; the total percentage of all appointments for an employee must be fewer than 100%.
b. Write a trigger on Emp table to ensure the following requirement; when a new employee enters the company his/her salary should be lower than the department manager otherwise do not insert its record into tables and give an error message.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Write a trigger on emp table to ensure the requirement
Reference No:- TGS0128650

Expected delivery within 24 Hours