Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task 2 (5 marks) Perform the following actions. (1) Connect to MySQL as a user csit115. Make a database csit115 a default database. Process SQL

image text in transcribedimage text in transcribed

Task 2 (5 marks) Perform the following actions. (1) Connect to MySQL as a user csit115. Make a database csit115 a default database. Process SQL script file dbdrop.sql to drop all relational tables used for implementation of the previous task. To create the relational tables of a sample database and to load data, process SQL script dbcreate.sql. (2) Create a logical backup of a relational table TRIPLEG. Save a logical backup in a file with the same name as a prefix of your University email account bak. For example, if a prefix of your University email is xyz007 then save a logical backup in a file xyz007.bak. (3) Connect to MySQL as a user csit 115. Select a database csit 115. Process a script disaster.sql. The script simulates a disaster that has happened to the relational table TRIPLEG. Some of the rows have been deleted, some of the rows are incorrectly inserted. Unfortunately, all deletions and insertions have been committed (4) Connect to MySQL as a user root either through command line interface mysql or graphical user interface MySQL Workbench and create a new database with a name the same as a prefix of your University email account. (5) Restore the logical backup of a relational tables TRIPLEG in a database prefix of your University email account. No report is expected from the actions performed so far. To implement and to test SQL script file solution2.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 solution2.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 solution2.sql and save a report in a file solution2.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 solution2.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?" 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 solution2.rpt with a report from processing of SQL script solution2.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 solution2.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 2 (5 marks) Perform the following actions. (1) Connect to MySQL as a user csit115. Make a database csit115 a default database. Process SQL script file dbdrop.sql to drop all relational tables used for implementation of the previous task. To create the relational tables of a sample database and to load data, process SQL script dbcreate.sql. (2) Create a logical backup of a relational table TRIPLEG. Save a logical backup in a file with the same name as a prefix of your University email account bak. For example, if a prefix of your University email is xyz007 then save a logical backup in a file xyz007.bak. (3) Connect to MySQL as a user csit 115. Select a database csit 115. Process a script disaster.sql. The script simulates a disaster that has happened to the relational table TRIPLEG. Some of the rows have been deleted, some of the rows are incorrectly inserted. Unfortunately, all deletions and insertions have been committed (4) Connect to MySQL as a user root either through command line interface mysql or graphical user interface MySQL Workbench and create a new database with a name the same as a prefix of your University email account. (5) Restore the logical backup of a relational tables TRIPLEG in a database prefix of your University email account. No report is expected from the actions performed so far. To implement and to test SQL script file solution2.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 solution2.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 solution2.sql and save a report in a file solution2.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 solution2.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?" 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 solution2.rpt with a report from processing of SQL script solution2.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 solution2.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

Pro SQL Server Wait Statistics

Authors: Enrico Van De Laar

1st Edition

1484211391, 9781484211397

More Books

Students also viewed these Databases questions