Write a trigger for total percentage of all appointments

Assignment Help Programming Languages
Reference no: EM1360494

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

Reference no: EM1360494

Questions Cloud

Strategies for testing internal controls : Discuss and explain three strategies for testing internal controls when information technology is used for significant accounting processing.
Show standards of living in the u.s. : How does the standard of living differ for the average American versus for the average person living in India
Explain how the negotiation experience actually happened : Explain how the negotiation experience actually happened and then consider the negotiating techniques
Heritage influencing-religious and political beliefs : Our cultural heritage can have a significant impact on our lives. Our heritage influences our religious and political beliefs, interests and hobbies, and even the food we eat.
Write a trigger for total percentage of all appointments : 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%.
Why manufacturer guarantees the computer for one year only : Why manufacturer guarantees the computer for one year only. The cost of the extended warranty is $150. Analyze this proposition using the concepts you learned in the module on risk analysis.
Federal role in regulating nfps : Show your views on whether or not the federal government should play a much larger role in regulating nonprofits and especially how nonprofits identify donors, collect funds, and spend fundraising dollars.
Important multiple choice questions : Owen is a holder of a promissory note obtain from Purchase Money Corporation Regarding the defenses against payment of the note to which Purchase Money is subject,
What is the work done on the gas : An antelope moving with constant acceleration covers the distance 77 m between two points in time 7.4 s. Its speed as it passes the second point is 15.5 m/s. What is its speed at first point.

Reviews

Write a Review

Programming Languages Questions & Answers

  Values of variables of logical section of the pseudocode

What are the values of variables a, b, and c after each line of code of each logical section of the pseudocode. Show why the logical section is running.

  Program to write variable declarations and function calls

Write a program whose main function is merely a collection of variable declarations and function calls. This program reads a text and outputs the letters, together with their counts.

  Software system to manage records of patients

A software system is to be developed to manage the records of patients who enter a clinic for treatment. The records include records of the all regular patient monitoring.

  Explain the functions which are useful

Explain some of the functions which you have found useful, where you found them, and how you use them. Describe good programming practices.

  Develop computerized pot hole tracking and repair system

Department of public works for city has decided to develop computerized pot hole tracking and repair system. As pot holes are reported to customer service.

  Creating website-based sales system for retail firm

Assume that you have been hired to create website-based sales system for large international retail sales firm.

  Write code for member method expand

Write code for the member method expand. To keep the code simple, you may assume that the array element has enough capacity and does not need to be resized.

  Application to convert kilometers in miles

Application will input number of kilometers, compute number of miles, and display number of miles. You will use a constant to store the kilometers-to-miles conversion factor.

  Implementing class called card for standard playing card

Design and implement a aclass called Card that represents a standard playing card. each card has a suit and a face value.

  Program to return the array index having largest savings

Write down function also called from main module - this function will find out and return array index containing the largest savings.

  Advantages and disadvantages for windows login

The Windows login can be a user or a group with users defined to the group. What do you think the advantages and disadvantages are for each type?

  Creating a security policy by gathering information

Suppose mantle of a security consultant. You are asked to visit a client and gather information to develop a security policy for them.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd