Maintain an audit trail of product table changes, PL-SQL Programming

The accuracy of product table data is critical and the Brwebean's. owner wants to have an audit file that contains information regarding all DML activity on the BB_PRODUCT table. This information should indicate the user id of the user running a DML statement, the date, the original values of the changed rows and the new values. The 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 on update to this table whenever one of the specified columns in the BB_PRODUCT table is changed.

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 assignment questions.

Update bb_product set salestart = '05-MAY-03', saleend = '12-MAY-03', saleprice = 9 where idproduct = 10;

Posted Date: 3/12/2013 2:09:11 AM | Location : United States







Related Discussions:- Maintain an audit trail of product table changes, Assignment Help, Ask Question on Maintain an audit trail of product table changes, Get Answer, Expert's Help, Maintain an audit trail of product table changes Discussions

Write discussion on Maintain an audit trail of product table changes
Your posts are moderated
Related Questions
Using the BULK COLLECT Clause The keywords BULK COLLECT specify the SQL engine to bulk-bind output collections before returning them to the PL/SQL engine. You can use these ke

Interesting properties of CROSS JOIN - SQL Compare these with the "interesting properties of JOIN", CROSS JOIN is associative but not commutative. Unlike JOIN and NATURAL JOI

At times, customers make mistakes in submitting their orders and call to cancel the order. Brewbean's wants to create a trigger that automatically updates the stock level of all pr

Need for Dynamic SQL: You need dynamic SQL in the situations as follows: 1) You would like to execute a SQL data definition statement (like CREATE), a data control statemen

What are 3 good practices of modeling and/or implementing data warehouses?

Brewbean's is implementing a new discount for return shoppers - every fifth completed order receives a 10% discount. The count of orders for a shopper is placed in a packaged varia

The accuracy of product table data is critical and the Brwebean's. owner wants to have an audit file that contains information regarding all DML activity on the BB_PRODUCT table. T

Recursive Subprograms The recursive subprogram is the one that calls itself. Think of a recursive call as a call to a few other subprograms that does the similar task as your

i have an assignment of DBMS subject, this assignment is based on SQL server and power BI

RETURN Statement The RETURN statement instantly completes the execution of a subprogram and returns control to the caller. The Execution then resumes with the statement below t