Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

MySQL Answer as soon as possible Multiple Choice 1. Which command backs up the s

ID: 3752556 • Letter: M

Question

MySQL
Answer as soon as possible
Multiple Choice

1. Which command backs up the single database called 'websites' to the file 'websites_backup.sql'?
(a) mysql --backup websites -u root -p > websites_backup.sql
(b) mysql --backup --single-database websites -u root -p > websites_backup.sql
(c) mysql --backup websites -u root -p --out-file websites_backup.sql
(d) mysqldump websites -u root -p > websites_backup.sql
(e) mysqldump --single-database websites -u root -p > websites_backup.sql

2. Which of the following is a correct INSERT statement for inserting data into a table called 'student' with a single column 'student_id'
(a) INSERT VALUES (10023344') INTO student COLUMNS student_id;
(b) INSERT INTO student COLUMNS student_id VALUES ('10023344');
(c) INSERT VALUES ('10023344') INTO student (student_id);
(d) INSERT INTO student (student_id) VALUES ('10023344');

3. The LOAD DATA INFILE MySQL command is for inserting data into a table where the data isn't formatted into INSERT statements.
(a) True
(b) False

4. The security option in MySQL, that when enabled, limits where a file can be loaded from when using the LOAD DATA INFILE command is called:
(a) secure_file_location
(b) secure_file_priv
(c) safe_file_load
(d) safe_file_location

5. Which of the following is a command in MySQL for creating a database called 'game_data'?
(a) INSERT DATABASE game_data;
(b) CREATE DATABASE game_data;
(c) MAKE DATABASE game_data;
(d) NEW DATABASE game_data;

6. Which of the following creates a new table called 'game_scores' with 2 columns 'player_name' and 'player_score'?

(a) CREATE TABLE game_scores (
player_name string(45),
player_score integer(10)
);

(b) NEW TABLE (
player_name varchar(45),
player_score int(10)
) AS game_scores;

(c) NEW TABLE game_scores (
player_name varchar(45),
player_score int(10)
);

(d) CREATE TABLE (
player_name varchar(45),
player_score int(10)
) AS game_scores;

(e) CREATE TABLE game_scores (
player_name varchar(45),
player_score int(10)
);

Explanation / Answer

1. (d)mysqldump websites -u root -p > websites_backup.sql

This command will backup the dump database .

2. (d) INSERT INTO student (student_id) VALUES ('10023344');

This command will insert the data into table.

3. False

In insert statement the data is not formatted.

4. (b) secure_file_priv

enabled limits where a file can be loaded from when using the LOAD DATA INFILE.

5. (b) CREATE DATABASE game_data;

CREATE DATABASE command is use to create a database.

6.  

(e) CREATE TABLE game_scores (player_name varchar(45),player_score int(10));

This is the command to create the table game_score with player_name and player_score column.