Create a trigger for auditing

Assignment Help Computer Engineering
Reference no: EM132174985

ONLY DO THIS USING SQL DEVELOPER (ORACLE SQL).

And using the following tables (Tables for Part 1 and 2):

CREATE TABLE Customers
(
Cust_id int PRIMARY KEY,
Last_Name varchar(255),
First_Name varchar(255),
State varchar(255),
Zipcode Number(10)
);

CREATE TABLE Customers_history
(
History_id int PRIMARY KEY,
Cust_id int,
Last_Name varchar(255),
First_Name varchar(255),
State varchar(255),
Zipcode Number(10)
);

TEST CODE BEFORE POSTING SOLUTION.

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.

Reference no: EM132174985

Questions Cloud

How much revenue did the company that entered : If the company whose product entered the market on time earned a total revenue of $25 million.
Did the geneticist isolate the wrong dna : Upon comparison she notes that the DNA sequence is 1000bp longer than the mRNA sequence. Did the geneticist isolate the wrong DNA?
Write a script that creates and calls a stored procedure : Write a script that creates and calls a stored procedure named spInsertProduct that inserts a row into the Products table.
Cellular respiration and for anaerobic respiration : If the one molecule of ATP releases 30.5 kJ/mol or 7.3 kcal/mol, calculate the theoretical efficiency (showing your work) for cellular respiration
Create a trigger for auditing : Create a trigger for auditing ?create trigger audit_customers on the Custoners table.
What could we conclude about those results : After boiling the saliva and adding the starch, we added 5 drops of HCL and incubated the tube in an ice bath before testing for the presence of maltose.
Questions for animal adaptations : What are detrivores What are substrate feeders What is another name for a suspension feeder:
Show the nal cache contents for a three-way set associative : Show the nal cache contents for a three-way set associative cache with two-word blocks and a total size of 24 words.
Fit a model with total sat score as the response : Fit a model with total sat score as the response and expend, ratio and salary as predictors.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd