Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use the script files HenryPSQL and HenryInventory to create the Henry Book Store database in your MySQL Database Server. develop a historical auditor to keep

Use the script files HenryPSQL and HenryInventory to create the Henry Book Store database in your MySQL Database Server.

develop a historical auditor to keep track of changes (inserts, updates and deletes) made to the data stored in any of the tables of the Henry Book Store Database using triggers, stored procedures or user defined functions as you see fit and necessary to achieve this task.

Create a new table HistoricalAudit in which to store history of changes performed on any of the tables of the Henry Books Store database. The new table should include the following columns, each of which should be defined with an adequate data type:

Table name

Column Name

Action

OldValue

NewValue

Keyval1

Keyval2

Keyval3

UserId

LogTimestamp

Create proper indexes in this table to speed up queries based on, for example, (LogTimestamp DESC, UserId, Table Name, Column Name, Action), (Table Name, Column Name, Action, LogTimestamp DESC), etc and any others you consider useful.

For each table of the Henry Book Store Database, write the necessary triggers for the appropriate events (inserts, updates and deletes) to capture data changes to any of the columns of a table into the HistoricalAudit table.

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

Step: 3

blur-text-image

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

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions

Question

13-4 What are alternative methods for building information systems?

Answered: 1 week ago

Question

13-1 How does building new systems produce organizational change?

Answered: 1 week ago