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

  Create a simple shell

Create a simple shell. Basically your shell should read the line from standard input, parse the line with command and arguments, and operate the command with arguments.

  Write program to merge two files that contain polynomials

Write a program that merges two files that contain polynomials. To merge two files, the input files must be in sorted order.

  Write program to ask user for low and high integer

Write a program that asks the user for the low and high integer in a range of integers. The program then asks the user for integers to be added up.

  Two-level memory cache hierarchy

Explain how you would pipeline the four following pairs of statements.

  Write program to take as input salesperson-s expected sales

Write program to take as input the salesperson's expected weekly sales and outputs the wages paid under each plan as well as announcing the best-paying plan.

  Complete a request for system services

Objectives Complete a Request for System Services form, which triggers the preliminary investigation phase. Analyze a user interview and extract pertinent facts, which can be used to assess project feasibility. Complete a Problem Stateme..

  Automate the task of invigilator allocation

you are required to carry out the following to automate the task of invigilator allocation which may not be limited to one's own department.

  Write a script to declares and sets variable

Write a script that declares and sets a variable thats equal to the total outstanding balance due. If that balance due is greater than $10,000.00.

  Creating webpage using css

In creating a web page, depending on the information you are trying to convey. What are CSS?

  Write a full program to convert seconds into hours

Write a full program (starting from #include) that takes as input the number of seconds after midnight and displays the time in hours.

  Program to solve roots of quadratic equation

Write down a program which solves the roots of the quadratic equation of the given form:- ax 2 + bx + c = 0. Display the results on screen.

  Write code for invoking method named sendtwo

Write the code for invoking a method named sendTwo. There are two arguments for this method: a double and an int.

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