Consider the following relational schema. An employee can work in more than one department; the pct_time...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider 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, budget: real, managerid: integer) Task 3. [30 points] Write triggers for the following general constraints. 1. When a new manager is appointed to a department, the manager must be a full time employee, otherwise reject the update and raise an error message. 2. When a new manager is appointed to a department, the system should make sure that the manager annual salary is >= 100,000 $. If not, then the system should raise the manager's salary to that level. 3. After appointing a new employee(s) to a department(s), the department(s) should recalculate its budget such that the new budget will equal the total salary of all employees who work in that department multiplied by two. Consider 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, budget: real, managerid: integer) Task 3. [30 points] Write triggers for the following general constraints. 1. When a new manager is appointed to a department, the manager must be a full time employee, otherwise reject the update and raise an error message. 2. When a new manager is appointed to a department, the system should make sure that the manager annual salary is >= 100,000 $. If not, then the system should raise the manager's salary to that level. 3. After appointing a new employee(s) to a department(s), the department(s) should recalculate its budget such that the new budget will equal the total salary of all employees who work in that department multiplied by two.
Expert Answer:
Related Book For
Database management systems
ISBN: 978-0072465631
3rd edition
Authors: Raghu Ramakrishan, Johannes Gehrke, Scott Selikoff
Posted Date:
Students also viewed these databases questions
-
Consider the following relational schema and SQL query. The schema captures information about employees, departments, and company finances (organized on a per department basis). Emp(eid: integer,...
-
Consider the following relational schema and briefly answer the questions that follow: 1. Define a table constraint on Emp that will ensure that every employee makes at least $10,000. 2. Define a...
-
Create the Control Panel interface that has the following 3 methods: public int warningLevel (); public String status (); public boolean isok (); Write 2 public static methods 1) Write a public...
-
Find the fractional part of the worlds land area within the continents of North America and South America. The map of the world below shows the fraction of the world's surface land area taken up by...
-
A paper recycling company converts newspaper, mixed paper, white office paper, and cardboard into pulp for newsprint, packaging paper, and print stock quality paper. The following table summarizes...
-
The magnitude of the gravitational force exerted by Earth on an object of inertia \(m_{1}\) is \(m_{1} g\). (a) What is the magnitude of the force exerted by the object on Earth (inertia...
-
Mama Leones Frozen Pizzas uses 50,000 units of cheese per year. Each unit costs $2.50. The ordering cost for the cheese is $250 per order, and its carrying cost is $0.50 per unit per year. Calculate...
-
The price of a car you want is $39,000 today. Its price is expected to increase by $1000 each year. You now have $23,500 in an investment account, which is earning 11% per year. How many years will...
-
Non-IFRS financial measures reported by public companies to its financial statement users may be helpful in deosion-makang but caution must be exercised becaune of the independence issue, given that...
-
Let f be the function defined by the equation below. f(x)=2+25-2 Find the following. f(-4) = 8 f(1) = 6 f(11/4) = 5 f(x+2)=2+27-x X
-
Suppose a vole consumes 2,500 mg of grass per month, and their secondary production is 300 mg per month. If the assimilation efficiency is 0.65 (65%), what is the production efficiency
-
How large is the impact of scarcity of natural resources on economic growth? What are the most important insights of economic sustainability for current policies regarding natural resources and the...
-
How might technology influence the importance of training professionals' roles? Can technology reduce the importance of any of the roles? Can it result in additional roles?
-
Briefly explain the reasons for the formation of monopolies in digital products.
-
Paula Beane owns a restaurant franchise that is part of a chain of southern homestyle restaurants. One of the chains popular breakfast items is biscuits and gravy. Central Warehouse makes and freezes...
-
Outline a general process applicable to most control situations. Using this, explain how you would develop a system to control home delivery staff at a local pizza shop.
-
Give an algorithm for testing whether a relation scheme is in BCNF. The algorithm should be polynomial in the size of the set of given FDs. (The size is the sum over all FDs of the number of...
-
Briefly answer the following questions: 1. Define the term functional dependency. 2. Why are some functional dependencies called trivial? 3. Give a set of FDs for the relation schema R(A,B,C,D) with...
-
Let R be decomposed into R1, R2, . . ., Rn. Let F be a set of FDs on R. 1. Define what it means for F to be preserved in the set of decomposed relations. 2. Describe a polynomial-time algorithm to...
-
Explain from a technical viewpoint why it is important to distinguish a method, research, approach, and design. Next, briefly discuss how understanding each term individually in addition to how these...
-
Discuss the importance of validity and research design. Next, choose one type of validity (internal, external, construct, or statistical conclusion) and discuss its relevance to experimental, quasi...
-
Define a sampling strategy.
Study smarter with the SolutionInn App