This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses on “Making Database Backups”.
1. How is the binary log rotated?
a) FLUSH LOGS
b) ROTATE LOGS
c) FLUSH BINLOG
d) ROTATE BINLOG
Explanation: MySQL supports incremental backups. The server should be started with the ‘–log-bin’ option to enable binary logging. The binary log files provide information to replicate changes to the database.
2. How is a delimited-text data file reloaded?
Explanation: In order to reload a delimited-text data file, use ‘LOAD DATA INFILE’ or ‘mysqlimport’. MySQL supports the incremental backups when the server is started with the ‘–log-bin’ option.
3. Which program performs logical backups?
Explanation: The ‘mysqldump’ performs logical backups. It produces a set of SQL statements that are executed to reproduce the original database object definitions. It dumps one or more MySQL databases for backup.
4. The option that suppresses output unless there are errors in the table is _____________
Explanation: In MySQL, the ‘–silent’ option suppresses the output unless there are errors in the tables. The ‘cron’ jobs typically generate a mail message if a job produces any output at all.
5. What is the return value from operations returning a row count?
Explanation: The Perl Non-handle variable ‘$ary’ is an array or list representing a row of values returned by a query. ‘$rc’ returns code from operations that return true or false. ‘$rv’ returns value from operations that return an integer. ‘$rows’ returns value from operations that return a row count.
6. Functions are called and pointers to structures are used while using DBI API.
Explanation: While using the DBI API functions are called and pointers to structures are used. The functions are called “methods,” pointers are called “references,” pointer variables are called “handles”.
7. The mode of search in which the search string is parsed into words and the search looks for rows is ________________
a) Boolean mode
b) Natural language
c) Query expansion
d) Cross mode
Explanation: In MySQL, a full text search capability is provided, which enables to look for words or phrases without using pattern-matching operations. There are three kinds of full text searches.
8. What is the hub of a MySQL installation?
Explanation: The server, mysqld , is the hub of a MySQL installation; it performs all manipulation of databases and tables. On Unix, several related scripts are available to assist in server startup.
9. How many of these are for use with only MyISAM tables?
mysql, mysqladmin, mysqldump, mysqlisamchk
Explanation: ‘mysqlcheck’ and ‘mysqlisamchk’ are the programs that perform table checking, analysis, optimization and repairs when tables become damaged. ‘mysqlcheck’ works with MyISAM tables.
10. The place where the server stores its databases and status files is called the data directory.
Explanation: The MySQL data directory is the place where the server stores its databases and status files. It is crucial to understand the all structures and contents of the data directory.
Sanfoundry Global Education & Learning Series – MySQL Database.
To practice all areas of MySQL Database, here is complete set of 1000+ Multiple Choice Questions and Answers.