Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

The accuracy of product table data is critical and the Brewbean's owner wants to have an audit 
file that contains information regarding all DML activity on the BB_PRODUCT table. This information should include the user id of the user issuing the DML action, the date, the original values
of the changed row, and the new values. This audit table needs to track specific columns of 
concern, including PRODUCTNAME, PRICE, SALESTART, SALEEND, and SALEPRICE. Create a table named BB_PRODCHG_AUDIT that can hold the relevant data. Then create a trigger named BB_AUDIT_TRG that fires an update to this table whenever one of the specified columns in the BB_PRODUCT table is changed.

Be sure to issue the following command. If you created the SALES_DATE_TRG trigger in the chapter, it will conflict with this assignment.
ALTER TRIGGER sales_date_trg DISABLE;
Use the following UPDATE statement to test your trigger. Then, complete a rollback and disable the trigger when completed so that it does not affect other assignments.

UPDATE bb_product
Set salestart = '05-MAY-03',
SALEPRICE = 9
Where idProduct = 10;

*tip: Multiple columns can be listed in an OF clause of a trigger by simply listing them separated by commas.

*tip: Hint: You will need to create the following audit table first, then create a trigger on the update of productname, price, salestart, saleend, and saleprice columns of bb_product.

CREATE TABLE bb_prodchg_audit
(user_id VARCHAR2(10),
chg_date DATE,
name_old VARCHAR2(25),
name_new VARCHAR2(25),
price_old NUMBER(5,2),
price_new NUMBER(5,2),
start_old DATE,
start_new DATE,
end_old DATE,
end_new DATE,
sale_old NUMBER(5,2),
sale_new NUMBER(5,2) );

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9108882

Have any Question?


Related Questions in Computer Engineering

1 write code in the method linearsearch in

1. Write code in the method linearSearch() in "SearchMethods"class which finds the element in an array using linear search approach and returns its index to the calling main method, otherwise it returns -1. 2. Write code ...

Will anyone help me with this and give me the explain how

Will anyone help me with this and give me the explain how did you get the answer? No coding necessary. Give truth tables for each the following Boolean expressions. a) not (P and Q) b) (not P) and Q c) (not P) or (not Q) ...

Stockholdingwrite a class stockholding the purpose of a

StockHolding Write a class StockHolding. The purpose of a StockHolding object is to represent a single stock in someone's investment portfolio. The StockHolding class has the following specification: instance variable of ...

Question suppose you have a table employee with the

Question : Suppose you have a table, EMPLOYEE, with the following attributes: eid, work_title, fname, lname, ssn, salary, date_of_birth, and commission_rate. Ms. Smith is vice president of sales. She and three regional s ...

Answer the following question where does the responsibility

Answer the following Question : Where does the responsibility of the software developer reside in considering the discrimination in techonology based on gender race and disability? How do you think it affects you as a pr ...

What is the types of cost fixed variable and marginal in

What is the types of cost: fixed, variable, and marginal in economics, and methods that market power alters the relationship between a firm's costs and the price at which it sells its product?

Can someone please help me with this pleasetaskthe purpose

Can Someone please help me with this please: Task: The purpose of this assignment is to empirically measure attributes for binary search trees. Steps: Create a program that will build a binary search tree (BST) by adding ...

Create login form to enter user name and a password textbox

Create login form to enter user name and a password textbox to enter password, and write procedure to simulate the process of triggering the login process after hitting the Enter Key.

According to a recent article the average number of babies

According to a recent article the average number of babies born with significant hearing loss (deafness) is approximately four per 1,000 babies in a healthy baby nursery. The number climbs to an average of 30 per 1,000 b ...

Mccann co has identified an investment project with the

McCann Co. has identified an investment project with the following cash flows. Year Cash Flow  1   $800  2    1,090 3    1,350 4    1,475 a. If the discount rate is 7 percent, what is the present value of these cash flow ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As