Question: Please use SQL/PQSQL not MYSQL Create audit table which will be populated each time a books retail price or cost is changed. The name, what

Please use SQL/PQSQL not MYSQL

Create audit table which will be populated each time a books retail price or cost is changed. The name, what fields you include in the audit table and it's intended use are for you to determine.

Create trigger to populate the audit table described above

Create function which returns the average retail price of all books in the books table

Create procedure which utilizes a cursor to update the retail price of all books in the books by a given percentage. The table that is used is below.

CREATE TABLE Books (ISBN VARCHAR2(10), Title VARCHAR2(30), PubDate DATE, PubID NUMBER (2), Cost NUMBER (5,2), Retail NUMBER (5,2), Discount NUMBER (4,2), Category VARCHAR2(12), CONSTRAINT books_isbn_pk PRIMARY KEY(isbn), CONSTRAINT books_pubid_fk FOREIGN KEY (pubid) REFERENCES publisher (pubid))

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!