Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Your assignment is to create an auditing policy that keep track of insertion and

ID: 640722 • Letter: Y

Question

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

Explanation / Answer

3. create table customers_history

HistoryId int(8),

custId int(5) ,
First_Name varchar(25),
Last_Name varchar(25),

State varchar(10),

zip_code int(6),

Primary Key (HistoryId)
);

4. create trigger audit_customers

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote