Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

bartleby

Concept explainers

Question

An objective of this task is to implement your own simple method of auditing the database activities.
It is strongly recommended to connect to MySQL either through command line interface mysql or graphical user interface MySQL Workbench and process a script file dbdrop.sql and immediately after that the scripts dbcreate.sql and dbload.sql to refresh a sample database csit115.
Download a file solution3.sql and insert into the file the implementations of the following actions.
You must connect as a user root with a password csit115.
Your implementation must directly follow a comment with a specification of a subtask.
(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 to save a general log in a relational table and to start recording a general log from now.

(3) Next, the script makes a database csit115 a default database, it stops recording a report, it executes a script file updates.sql, and it resumes recording a report into a file solution3.rpt.
A listing of SQL statements processed from a script file updates.sql must
NOT be included in the report file solution3.rpt.

(4) Next, the script sets the appropriate values of all variables to stop recording a general log from now.

(5) Finally, the script finds and lists how many times each one of the relational tables included in a sample database have been used by the successfully processed SQL statements included in SQL script updates.sql. You have to consider the relational tables with the following names LPOSITION, DEPARTMENT, EMPLOYEE, SUBJECT, RUNNINGSUBJECT, and TEACHES. No other relational tables need to be considered. The script must list the names of relational tables  together with the total number of times each table has been used. Please, find a fragment of a sample output listed below.
+------------+-------+
| TABLE_NAME | TOTAL |
+------------+-------+
| DEPARTMENT | 8 |
| SUBJECT | 6 |
... ...
+------------+-------+
6 rows in set (0.01 sec)
To simplify this task, assume that a relational table is used no more than one time in a SQL statement.
The results must be listed in the descending order of the total number of times each one of the relational tables has been used by the successfully processed SQL statements included in a script updates.sql.

When ready connect as root user, process a script file solution3.sql, and save a report from processing in a file solution3.rpt.

Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education