Using SQL Developer Your assignment is to create an auditing policy that keep track of insertion … 1 answer below »

Ace your studies with our custom writing services! We've got your back for top grades and timely submissions, so you can say goodbye to the stress. Trust us to get you there!


Order a Similar Paper Order a Different Paper

Using SQL Developer

Your assignment is to create an auditing policy that keep track of insertion and update activities of Customers table. This Customers trigger fires before update or insert or delete on customers. You have to test your trigger and provide screenshots to prove that it works correctly

D1. Create a new table named Customers. The new table should have at least 5 columns including a primary key. (Cust-id, First_name, Last_name, State, Zip-code. Use cust_id as PK.

D2. Insert 2 rows into the Customers table.

D3. Create a history table for Customers table, (create table customers_history). The table should have same structure as Customers table Cust-id + First_name + Last_name+ State + Zip_code. Don’t forget the history_id as pk . Do NOT insert any data (values) into this table.

D4. Create a trigger for auditing—create trigger audit_customers on the Custoners table

D5. Insert 3 records into the Customers table.

D4. Retrieve all rows from customers and customers-history table to verify that rows were added to the Customers table and that the trigger is populating the customers-history table.

D5. Now update the zip code of one customer and check if rows were added to the customers table and that the trigger did populate the customers-history table with the new zip code.

D6. Update the first record of Customers, and then delete this record.

D7. Display the content of Customers table and the history table.

You have to provide the trigger code, code you used to create the table and insert records. (2 points)

Writerbay.net

Looking for top-notch essay writing services? We've got you covered! Connect with our writing experts today. Placing your order is easy, taking less than 5 minutes. Click below to get started.


Order a Similar Paper Order a Different Paper