This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses on ” Principles of Preventive Maintenance”.
1. The recovery of data changes made since a given point in time is called _____________
Explanation: Incremental recovery refers to recovery of data changes made since a given point in time. It is performed after restoring a full backup that brings the server to its state as of the time the backup was made.
2. What performs a key distribution analysis and stores the distribution for the named table or tables?
a) ANALYZE TABLE
b) CHECK TABLE
c) CHECKSUM TABLE
d) OPTIMIZE TABLE
Explanation: ‘ANALYZE TABLE’ performs a key distribution analysis and stores the distribution for the named table or tables. For the MyISAM tables, this statement is equivalent to using ‘myisamchk –analyze’.
3. Which of the following columns is not returned by ‘OPTIMIZE TABLE’?
Explanation: ‘OPTIMIZE TABLE’ table catches and throws any errors that occur while copying table statistics from the old file to the newly created file. It returns a result set of columns.
4. REPAIR TABLE does not work for _____________
Explanation: ‘REPAIR TABLE’ works for MyISAM, ARCHIVE, and CSV tables. For MyISAM tables, it has the same effect as ‘myisamchk –recover’ tbl_name by default. This statement does not work with views.
5. The binary protocol is easy to use.
Explanation: The binary protocol is more difficult to use because more setup is necessary for transmitting and receiving data values. The binary protocol does not support all statements like ‘USE’.
6. What is the maximum collations a character set can have?
d) more than 1
Explanation: The MySQL server allows simultaneous use of multiple character sets. A given character set is allowed to have one or more collations. It can be chosen according to the need of the database.
7. What is a synonym for CHARACTER SET?
Explanation: ‘CHARACTER SET’ can be abbreviated into ‘CHARSET’ and can be used in the same contexts and statements where ‘CHARACTER SET’ is used. ‘charset’ is the server-supported character set.
8. The line which is written at the top of the script to write a Perl script using CGI.pm is ______________
a) use this CGI
b) put CGI
c) use CGI
d) include CGI
Explanation: In order to write a Perl script that uses the ‘CGI.pm’ module, a ‘use CGI’ statement is included near the beginning of the script that imports the function names of the module.
9. CGI.pm also supports an object oriented style of use.
Explanation: ‘CGI.pm’ supports an object oriented style of use which allows to invoke its functions without importing the names. To do this, a use statement is included and a CGI object is created.
10. There can be more than one column per table with the AUTO_INCREMENT attribute.
Explanation: In MySQL, there can only be one column per table with the AUTO_INCREMENT attribute. It should also have an integer data type. The AUTO_INCREMENT is also allowed for floating point types.
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.