using the oracel sql answer this 5-(20%) Create a stored procedure called set_comm which will go through
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
5-(20%) Create a stored procedure called set_comm which will go through each record in the STAFF table and set the COMM columns as follows: - - 20% of the SALARY if JOB = "Mgr" 10% of the SALARY if JOB = "Clerk" 30% of the SALARY if JOB = "Sales" 50% of the SALARY if JOB = "Prez" Use an UPDATE trigger called upd_comm which will record (insert) a record in the STAFFAUDTBL which records what change was made to the COMM of each individual in the STAFF table. You will need to add two columns to the STAFFAUDTBL table. One called OLDCOMM and another called NEWCOMM. When INSERTing a record into this table for Q5 you should fill in the ID, set INCJOB to NULL, place the original commission (COMM) in the OLDCOMM field and new commission (COMM) in the NEWCOMM field. WHAT TO HAND IN: A copy of your stored procedure code and trigger code -and-output of the STAFF table after this stored procedure has been executed - and - a copy of your STAFFAUDTBL after the stored procedure has been executed. 5-(20%) Create a stored procedure called set_comm which will go through each record in the STAFF table and set the COMM columns as follows: - - 20% of the SALARY if JOB = "Mgr" 10% of the SALARY if JOB = "Clerk" 30% of the SALARY if JOB = "Sales" 50% of the SALARY if JOB = "Prez" Use an UPDATE trigger called upd_comm which will record (insert) a record in the STAFFAUDTBL which records what change was made to the COMM of each individual in the STAFF table. You will need to add two columns to the STAFFAUDTBL table. One called OLDCOMM and another called NEWCOMM. When INSERTing a record into this table for Q5 you should fill in the ID, set INCJOB to NULL, place the original commission (COMM) in the OLDCOMM field and new commission (COMM) in the NEWCOMM field. WHAT TO HAND IN: A copy of your stored procedure code and trigger code -and-output of the STAFF table after this stored procedure has been executed - and - a copy of your STAFFAUDTBL after the stored procedure has been executed.
Expert Answer:
Related Book For
Database Systems Design Implementation and Management
ISBN: 978-1285196145
11th edition
Authors: Carlos Coronel, Steven Morris
Posted Date:
Students also viewed these databases questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
The Crazy Eddie fraud may appear smaller and gentler than the massive billion-dollar frauds exposed in recent times, such as Bernie Madoffs Ponzi scheme, frauds in the subprime mortgage market, the...
-
Solve 1. dx dy + x 1-xy=xy.
-
Define a scope limitation and distinguish between client-imposed and circumstance-imposed scope limitations. What reporting options are available to auditors when scope limitations are encountered...
-
Without consulting Table 2.5 arrange the following compounds in order of decreasing heat of combustion: pentane, isopentane, neopentane, hexane.
-
Two parallel-plate capacitors are identical except that capacitor 1 has vacuum between the plates and capacitor 2 has a dielectric slab of dielectric constant \(\kappa\) filling the space between the...
-
Analyze the marketing environment and the forces shaping eBays business over the years. Pop quiz: Name the high-tech company that got its start in someones living room, grew from zero revenue to a...
-
* Select the jobs of the operating system many answers Manage CPU and Memory Provide computer with power Provide user interface Cool down the computer
-
The world is gradually recovering from the COVID-19 pandemic, and many businesses are returning to conducting physical business meetings instead of virtual ones. Traveling for business purposes...
-
For the floor system shown in Figure P12.16, draw the influence lines for shear between points \(B\) and \(C\) and for the moment at points \(C\) and \(E\) in the girder. H A B C D 5 @ 24' 120' E F G
-
Who benefits from the Olympic and Amateur Sports Act prohibition of judicial review for eligibility disputes against the USOPC that occur within 21 days of the Games? Does it help or hinder most...
-
What is the function of the National Institutes of Health?
-
On January 23, 2006, CNET News.com quoted an anonymous source describing strategic plans made at a meeting of HPs board of directors. Because the meeting was held behind closed doors and with a...
-
To what extent do you think that buyer behaviour can be reduced to rules-based models applicable to a variety of service buying situations?
-
Virat Kohli Welders is planning to replace an old machine with a new one to improve efficiency in its production process. The machine will increase efficiency as it is more modern and will result in...
-
Is the modified 5-question approach to ethical decision making superior to the modified moral standards or modified Past in approach?
-
What is a trigger, and what is its purpose? Give an example.
-
What is the difference between an object and a class in the object oriented data model (OODM)?
-
What is the SQL command to list the total sales by customer, month and product, with subtotals by customer and by month and a grand total for all product sales?
-
Figure 4.11 shows the \(v_{x}(t)\) curves for a collision between two identical carts moving not on a low-friction track but rather on a rough surface, so that friction affects their motion. Are the...
-
A small stone is fastened to the top of a standard cart of inertia \(1 \mathrm{~kg}\) to form a combination of unknown inertia \(m_{1}\). A second standard cart is then launched with an initial...
-
(a) A red cart with an initial speed of \(0.35 \mathrm{~m} / \mathrm{s}\) collides with a stationary standard cart \(\left(m_{\mathrm{s}}=1.0 \mathrm{~kg} ight)\). After the collision, the standard...
Study smarter with the SolutionInn App