Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Foundations of Financial Management

Authors: Stanley Block, Geoffrey Hirt, Bartley Danielsen, Doug Short, Michael Perretta

10th Canadian edition

1259261018, 1259261015, 978-1259024979

More Books

Students also viewed these Databases questions

Question

600 lb 20 0.5 ft 30 30 5 ft

Answered: 1 week ago