Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task 3 (5 marks) An objective of this task is to implement your own simple method of auditing the database activities. Before you start implementation

image text in transcribedimage text in transcribedimage text in transcribed

Task 3 (5 marks) An objective of this task is to implement your own simple method of auditing the database activities. Before you start implementation of this task, process a script file dbdrop.sql and immediately after that the scripts dbcreate.sql to refresh a sample database. No report is expected from processing of the scripts dbdrop.sql and dbcreate.sql. Download a file solution3.sql and insert into the file the implementations of the following actions. (1) First, the script makes a relational table that contains a general log empty. (2) Next, the script sets the appropriate values of the variables, that allow to create a general log and to save a general log in a relational table. (3) Next, the script processes one INSERT, one DELETE and one UPDATE statement that operate on the relational table TRIP and TRIPLEG. The statements are up to you. (4) Next, the script sets the appropriate values of all variables that stop recording a general log from now. (3) Next, the script lists DML statements INSERT, DELETE, and UPDATE processed in a period of time when a general log was recorded. (4) Next, the script lists total number of times the relational tables TRIP and TRIPLEG have been accessed by DML statements INSERT, DELETE, and UPDATE. When ready process SQL scrip solution3.sql and save a report from the processing When ready process SQL scrip solution3. sql and save a report from the processing of the script in a file solution3.rpt. To implement and to test SQL script file solution3. sql you can either use graphical user interface SQL Developer or command line interface mysql. To create a report from processing of a script file solution3.sql open a Terminal window and start the command line interface mysql in the following way: mysql -u csit115 -p -v -C Next, process SQL script solution3.sql and save a report in a file solution3.rpt. Note, that when started with the options -v and -c the command line interface includes both listing of SELECT statements processed and the comments included in the original version of a file solution3.sql. We have already practiced saving a report from processing of SQL script in the Laboratory 2. You can also find more information about creating reports from processing of SQL scripts in Cookbook, Recipe 3.1 How to use "mysql? Command based interface to MySQL database server? Step 4 How to save the results of SQL processing in a file?" We have already practiced saving a report from processing of SQL script in the Laboratory 2. You can also find more information about creating reports from processing of SQL scripts in Cookbook, Recipe 3.1 How to use "mysql? Command based interface to MySQL database server? Step 4 How to save the results of SQL processing in a file?" A report that contains no listing of processed SQL statements scores no marks and report that contains errors of any kind also scores no marks ! Deliverables A file solution3.rpt with a report from processing of SQL script solution3.sql. The report must be created with the command line interface mysql, the report MUST NOT include any errors, and the report MUST LIST ALL SQL statements processed and ALL comments included in the original (downloaded) version of solution3.sql. Marks will be deducted for the missing comments. Submission of a file with a different name and/or different extension and/or different type scores no marks. Task 3 (5 marks) An objective of this task is to implement your own simple method of auditing the database activities. Before you start implementation of this task, process a script file dbdrop.sql and immediately after that the scripts dbcreate.sql to refresh a sample database. No report is expected from processing of the scripts dbdrop.sql and dbcreate.sql. Download a file solution3.sql and insert into the file the implementations of the following actions. (1) First, the script makes a relational table that contains a general log empty. (2) Next, the script sets the appropriate values of the variables, that allow to create a general log and to save a general log in a relational table. (3) Next, the script processes one INSERT, one DELETE and one UPDATE statement that operate on the relational table TRIP and TRIPLEG. The statements are up to you. (4) Next, the script sets the appropriate values of all variables that stop recording a general log from now. (3) Next, the script lists DML statements INSERT, DELETE, and UPDATE processed in a period of time when a general log was recorded. (4) Next, the script lists total number of times the relational tables TRIP and TRIPLEG have been accessed by DML statements INSERT, DELETE, and UPDATE. When ready process SQL scrip solution3.sql and save a report from the processing When ready process SQL scrip solution3. sql and save a report from the processing of the script in a file solution3.rpt. To implement and to test SQL script file solution3. sql you can either use graphical user interface SQL Developer or command line interface mysql. To create a report from processing of a script file solution3.sql open a Terminal window and start the command line interface mysql in the following way: mysql -u csit115 -p -v -C Next, process SQL script solution3.sql and save a report in a file solution3.rpt. Note, that when started with the options -v and -c the command line interface includes both listing of SELECT statements processed and the comments included in the original version of a file solution3.sql. We have already practiced saving a report from processing of SQL script in the Laboratory 2. You can also find more information about creating reports from processing of SQL scripts in Cookbook, Recipe 3.1 How to use "mysql? Command based interface to MySQL database server? Step 4 How to save the results of SQL processing in a file?" We have already practiced saving a report from processing of SQL script in the Laboratory 2. You can also find more information about creating reports from processing of SQL scripts in Cookbook, Recipe 3.1 How to use "mysql? Command based interface to MySQL database server? Step 4 How to save the results of SQL processing in a file?" A report that contains no listing of processed SQL statements scores no marks and report that contains errors of any kind also scores no marks ! Deliverables A file solution3.rpt with a report from processing of SQL script solution3.sql. The report must be created with the command line interface mysql, the report MUST NOT include any errors, and the report MUST LIST ALL SQL statements processed and ALL comments included in the original (downloaded) version of solution3.sql. Marks will be deducted for the missing comments. Submission of a file with a different name and/or different extension and/or different type scores no marks

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part I Lnai 8724

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448475, 978-3662448472

More Books

Students also viewed these Databases questions