Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started