Write Procedural code for SQL, MYSQL DBMS, to perform the following tasks and submit your code...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write Procedural code for SQL, MYSQL DBMS, to perform the following tasks and submit your code in one PDF file with enough comments. 1) Create a function that will return the second maximum salary, integer attribute, from the Employees table, where the table schema is Employees(eid, ename, dno, job, salary). You have to use CURSOR to solve this task. 2) Create a trigger that will archive the update process on the customer s' balance, in Customer table, only into the BalanceUpdate table. The trigger will not archive any update of the other attributes in the Customer table. For your solution consider the following schemas: - Customer(cid, cname, caddress, accountNo, accountType, balance) - BalanceUpdate(user, updateTime, cid, accountNo, oldBalance, newBalance) Write Procedural code for SQL, MYSQL DBMS, to perform the following tasks and submit your code in one PDF file with enough comments. 1) Create a function that will return the second maximum salary, integer attribute, from the Employees table, where the table schema is Employees(eid, ename, dno, job, salary). You have to use CURSOR to solve this task. 2) Create a trigger that will archive the update process on the customer s' balance, in Customer table, only into the BalanceUpdate table. The trigger will not archive any update of the other attributes in the Customer table. For your solution consider the following schemas: - Customer(cid, cname, caddress, accountNo, accountType, balance) - BalanceUpdate(user, updateTime, cid, accountNo, oldBalance, newBalance)
Expert Answer:
Related Book For
Quantitative Analysis for Management
ISBN: 978-0133507331
12th edition
Authors: Barry Render, Ralph M. Stair, Michael E. Hanna, Trevor S. Ha
Posted Date:
Students also viewed these programming questions
-
The Laurenster Corporation needs to perform the following tasks in weeks. Determine the associated PERT network diagram and determine the probability that the project will be complete in 16 weeks or...
-
Write a function that will return a full name string when passed a first name string, a middle name or initial string, and a last name string. If the middle initial is blank, there should be only one...
-
Write SQL statements to perform the following operations on the wine cellar database: a. Get bin number, name of wine, and number of bottles for all Geyser Peak wines. b. Get bin number and name of...
-
Evaluating these 3 bonds: Face value Coupon rate Maturity year A 1000 8% 5 B 1000 6% 10 C 1000 0% 10 Suppose the yield curve is flat at 7% for all maturities. Use annual compounding in this problem....
-
Sweetstuff Bakery would like to buy a special machine for icing and applying other toppings to pastries. These are now applied by hand. The machine that the bakery is considering costs $90,000 new....
-
You can purchase a residential building lot for $60,000 cash, or for $10,000 down and month-end payments of $1000 for five years. If money is worth 7.5% compounded monthly, which option should you...
-
Discuss the importance of genetic markers.
-
The December 31, 2012, statement of financial position for the Blood Donors of America Foundation is presented below. Statement of Financial Position December 31, 2012 Assets...
-
Grove Company has budgeted the following credit sales for the last six months of the current year. GROVE COMPANY BUDGETED CREDIT SALES FOR LAST SIX MONTHS OF CURRENT YEAR July $ 3 0 0 , 0 0 0 October...
-
1. What is your assessment of the financial performance of Nelson Nurseries? 2. Do you agree with Christine Barton?s accounts-payable policy? 3. What explains the erosion of the cash balance? 4. What...
-
Sarah, Sue, and AS Inc. formed a partnership on May 1, 20X9 called SSAS, LP. Now that PS is formed, they must determine its appropriate year-end. Sarah has a 30% profit and capital interest while Sue...
-
In a slider crank mechanism, the force applied to the piston is 1 kN, when the crank is at 60 from IDC. The length of the crank is 100mm and connecting rod is 300 mm. Calculate the driving torque T...
-
A dam across a Maine river is going to be dismantled. Its original dimensions above the water on the downriver side of the dam are shown below. On the upriver side of the dam, the water level reaches...
-
ignored.) (Worth 5%) Question 3 Give a reasoned explanation as to why the outer border has 3 rounded corners unlike the inner border? (Limit your answer to 500 characters only. Any longer answers...
-
[10] When executed, the program performs the following: a) Count # of ones in WRD b) Count # of zeros in WRD c) Multiplying WRD by 2 d) Dividing WRD by 2
-
If a severance pay plan is structured as a parachute, the employer deduction is limited and the employee is subject to penalty. Question 12 options: True False
-
In the career planning process, the ____ is the step at which you assess the salary and other financial factors as well as the organizational environment of your potential employer. Question 21...
-
The following processes constitute the air-standard Diesel cycle: 12: isentropic compression,23: constant-volume energy addition (T and P increase),34: constant-pressure energy addition (v...
-
Why is the central limit theorem so important in quality control?
-
If the ROP is greater than the order quantity, explain how the ROP is implemented. Can the ROP be more than twice the order quantity and, if so, how is such a situation handled?
-
Katherine DAnn, from Problem 1-18, has become concerned that sales may fall, as the team is on a terrible losing streak, and attendance has fallen off. In fact, Katherine believes that she will sell...
-
Define and distinguish between an open and a closed adoption.
-
Define and distinguish between an independent and an agency adoption.
-
Define and give an example of an equitable adoption.
Study smarter with the SolutionInn App