1. Trigger: Study the trigger and answer the questions that follow. 1. Consider the INVOICE table...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Trigger: Study the trigger and answer the questions that follow. 1. Consider the INVOICE table structure below: invoice id invoice date. invoice total payment total credit total invoice due date. payment date. CTL REC_user CTL_SEC_level DECLARE V level NUMBER; V_name VARCHAR2 (20); BEGIN END; NUMBER (12), DATE, NUMBER (9, 2), NUMBER (9,2), NUMBER (9, 2), A trigger is created on the INVOICE table: CREATE OR REPLACE TRIGGER Trg_on_Quiz BEFORE INSERT OR UPDATE ON Invoice FOR EACH ROW FROM AUTHORIZED USERS WHERE USERNAME = USER; DATE, DATE, VARCHAR2 (12), NUMBER (1) SELECT USERNAME, SECURITY LEVEL INTO V_name, v_level NEW.CTL REC user : V name; : NEW.CTL SEC level : V_level; EXCEPTION WHEN NO DATA FOUND THEN RAISE APPLICATION_ERROR (-20003, Unauthorized User'); In Oracle/PLSQL, the USER function returns the user_id from the current Oracle session. Write a SQL test statement to fire the trigger (5 points) 1. Trigger: Study the trigger and answer the questions that follow. 1. Consider the INVOICE table structure below: invoice id invoice date. invoice total payment total credit total invoice due date. payment date. CTL REC_user CTL_SEC_level DECLARE V level NUMBER; V_name VARCHAR2 (20); BEGIN END; NUMBER (12), DATE, NUMBER (9, 2), NUMBER (9,2), NUMBER (9, 2), A trigger is created on the INVOICE table: CREATE OR REPLACE TRIGGER Trg_on_Quiz BEFORE INSERT OR UPDATE ON Invoice FOR EACH ROW FROM AUTHORIZED USERS WHERE USERNAME = USER; DATE, DATE, VARCHAR2 (12), NUMBER (1) SELECT USERNAME, SECURITY LEVEL INTO V_name, v_level NEW.CTL REC user : V name; : NEW.CTL SEC level : V_level; EXCEPTION WHEN NO DATA FOUND THEN RAISE APPLICATION_ERROR (-20003, Unauthorized User'); In Oracle/PLSQL, the USER function returns the user_id from the current Oracle session. Write a SQL test statement to fire the trigger (5 points)
Expert Answer:
Answer rating: 100% (QA)
Trigger is a program that is automatically fired by your dat... View the full answer
Related Book For
Posted Date:
Students also viewed these electrical engineering questions
-
Consider the following scenario and answer the questions that follow: You have been consulted to advise on a new retail outlet selling upmarket mens clothing, targeting older, high income male...
-
Study the following case. Answer the questions that follow with Yes or No. Katsoulas, a U.S. car dealer, had a contract with a Korean automobile manufacturer for the delivery of several cars. When...
-
Study the following case. Answer the questions that follow with Yes or No. Straley Corporation, a manufacturer of hand tools, had been exporting its products to several countries in Europe for 10...
-
The Chief Financial Officer at Ford Motor Company is said to usea hybrid-costing system. Define the hybrid-costing system. Explainthe advantages to this company to use this system. I want a 10 page 2...
-
The plant manager at Automaton Robotics is looking at the summarized incremental rate of return information shown below for five mutually exclusive alternatives, one of which must be chosen. The...
-
An image is 1600 1200 pixels with 3 bytes/pixel. Assume the image is uncompressed. How long does it take to transmit it over a 56-kbps modem channel? Over a 1-Mbps cable modem? Over a 10-Mbps...
-
Identify each of the following assets as a plant asset (P) or an intangible asset (I): 1. Franchises 2. Vehicles 3. Buildings 4. Furniture 5. Patents 6. Copyrights 7. Trademarks 8. Land improvements
-
FA Manufacturers must make several investment decisions related to its business operations. Interest is compounded annually. Analyze the following independent situations to help FA make a profitable...
-
17. Simplify: (-3)7 (-3)4 18. What percent of 0.14 is 0.035?
-
Daniel B. Butler and Freida C. Butler, husband and wife, file a joint return. The Butlers live at 625 Oak Street in Corbin, KY 40701. Dan's Social Security number is 111-11-1112, and Freida's is...
-
Create an exploded pie chart object. Use Chart Tools command tabs. Edit the data source. An exploded pie chart shows one or more of the slices detached from the rest of the pie to emphasize the...
-
The following transactions were completed by the company: a. The company completed consulting work for a client and immediately collected $7,300 cash. b. The company completed commission work for a...
-
Marketing and decision-making go hand in hand. Marketing campaigns are, in fact, created based on knowledge related to how humans behave, what they react to, what makes them happy, etc. Choosing the...
-
The use of pay grades and pay ranges and their relationship to internal alignment and external competitiveness. Why are pay grades and pay ranges necessary?
-
Write Java program to find the factorial of number. Input number should be given by user. ) Write Java program to read a file content line by line. Simple natural language words are very basic index...
-
Save Planning Partners Investors is opening an office in Atlanta, Georgia. Fixed monthly expenses are office rent ($2,000), depreciation on office furniture ($270), utilities ($280), special...
-
1. Consider steady, incompressible viscous flow in an annulus, the region between concentric circular cylinders, where the velocity is only in the z-direction out of the page. Find the velocity...
-
In Exercises, find the equation of the tangent line at the given point on each curve. 2y 2 - x = 4; (16, 2)
-
Fellowes and Associates Chartered Accountants is a successful mid-tier accounting firm with a large range of clients across Canada. During 2011, Fellowes and Associates gained a new client, Health...
-
Harlan Venture Inc. (HV) operates a restaurant named Harlan's, which is located in Toronto. The shareholder, Taufiq Noorani, is concerned whether the system and controls in place at the restaurant...
-
Shane White bone is getting to know his new client, Clarrie Potters, a large discount electrical retailer. Ben Brothers has been the engagement partner on the Clarrie Potters' audit for the past five...
-
Typically most large scale commercial developments require an environmental impact assessment to be undertaken as part of the planning process. While more a regulatory requirement, such an assessment...
-
Use the data presented in 12.13. The probability of the monthly contribution from the new product exceeding 13 500 is: (a) 24.5% (b) 30.5% (c) 63.0% (d) 92.5% 12.13: A company expects to sell 1000...
-
Most businesses will try to minimize risk through a combination of risk assessment, risk management and, where possible, transfer the risk to another party. For businesses, risks like theft, fire...
Study smarter with the SolutionInn App