DAB102 Information Management Tables - Notes PDF

Summary

This document contains practice questions on database management system (DBMS) backup and recovery techniques, focusing on SQL commands. In particular, it covers the process of importing CSV data and the types of backups and recovery procedures, using MySQL as an example.

Full Transcript

What SQL commands would you use to import students.csv into a database students table? LOAD DATA INFILE \'/path/to/your/students.csv\' INTO TABLE students FIELDS TERMINATED BY \',\' ENCLOSED BY \'\"\'\ LINES TERMINATED BY \'\\n\'\ IGNORE 1 ROWS; \-- If your CSV file contains a header row 2. What...

What SQL commands would you use to import students.csv into a database students table? LOAD DATA INFILE \'/path/to/your/students.csv\' INTO TABLE students FIELDS TERMINATED BY \',\' ENCLOSED BY \'\"\'\ LINES TERMINATED BY \'\\n\'\ IGNORE 1 ROWS; \-- If your CSV file contains a header row 2. What type of backup and recovery can be performed on a database management system (DBMS)? - Full backup of the entire database - Differential backup, which backs up only the data that has changed since the last full backup. - Transaction log backup, which backs up the transaction log records. - Restore full backup from a full database backup. - Restoring differential backup, which restores from a full database backup followed by a differential backup. - Restoring transaction log backup, which restores from a full database backup followed by one or more transaction log backups. 3. A server with active transactions restarts after a failure. What type of recovery would you recommend? - A transaction log recovery, which restores from a full database backup followed by one or more transaction log backups. - This would replay any in doubt transactions and be brought back to a consistent state. 4. Use the MySQL movie.sql database to answer the following questions. a. What SQL commands would you use to backup and restore the person table? b. What SQL commands would you use to backup and restore the movie database? Database: movie.sql **mysqldump -u root -p movie Person \> backup\_person.sql** **mysql -u root -p movie \< backup\_person.sql** **mysqldump -u root -p movie \> backup\_movie.sql** **mysql -u root -p movie \< backup\_movie.sql**

Use Quizgecko on...
Browser
Browser