This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses on “MySQL Components”.
1. The hub of a MySQL installation is ______________
a) mysqla
b) mysqlb
c) mysqlc
d) mysqld
View Answer
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.
2. How many of these are for use with only MyISAM tables?
mysql, mysqladmin, mysqldump, mysqlisamchk
a) 1
b) 2
c) 3
d) 4
View Answer
Explanation: ‘mysqlcheck’ and ‘mysqlisamchk’ are the programs that perform table checking, analysis, optimization and repairs when tables become damaged. ‘mysqlcheck’ works with MyISAM tables.
3. The place where the server stores its databases and status files are the data directory.
a) True
b) False
View Answer
Explanation: The MySQL data directory is the place where the server stores its databases and status files. It is crucial to understand that all the structures and contents of the data directory.
4. The tool for copying databases is ______________
a) mysql
b) mysqlcheck
c) mysqlhotcopy
d) mysqlisamchk
View Answer
Explanation: ‘mysqldump’ and ‘mysqlhotcopy’ are the tools or programs that are used for performing the backing up of the databases and copying databases from one server to the other server(s).
5. Which statement is used to check how MySQL would execute a SELECT query?
a) TELL
b) SHOW
c) DISPLAY
d) EXPLAIN
View Answer
Explanation: In MySQL, by issuing an EXPLAIN statement MySQL displays some information about how it would execute a SELECT query without actually executing it. It is prefixed with the query.
6. What is used to perform an analysis of key values by the server?
a) ANALYZE KEYS
b) ANALYZE TABLE
c) PERFORM ANALYSIS
d) PERFORM TABLE ANALYSIS
View Answer
Explanation: In MySQL, for the MyISAM and InnoDB tables, the server can be told to perform an analysis of key values by issuing the ANALYZE TABLE statement. It helps in knowing about query optimization.
7. The function used to convert an int to string is ______________
a) INET_ATON()
b) INET_NTOA()
c) INET_ITOS()
d) INET_STOI()
View Answer
Explanation: In MySQL, the function used to convert an integer to a string is INET_NTOA(). On the other hand, the function INET_ATON() converts a string to the corresponding integer value.
8. The function used to convert a string to an int is ______________
a) INET_ATON()
b) INET_NTOA()
c) INET_ITOS()
d) INET_STOI()
View Answer
Explanation: In MySQL, the function used to convert a string to an integer is INET_ATON(). On the other hand, the function INET_NTOA() converts a string to the corresponding integer value.
9. Which of the following is more efficient?
LOAD DATA, INSERT
a) LOAD DATA
b) INSERT
c) Same
d) Indeterminate
View Answer
Explanation: In MySQL, the ‘LOAD DATA’ in all forms is more efficient than the ‘INSERT’ because it loads rows in bulk. The server first parses then interprets only one statement instead of many.
10. Without LOCAL, LOAD DATA is _________________
a) less efficient
b) more efficient
c) same speed
d) arbitrary
View Answer
Explanation: LOAD DATA is more efficient without LOCAL. Without LOCAL, the file must be located on the server. The FILE privilege must be given. The server can read the file directly from disk.
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.
- Check Information Technology Books
- Check MySQL Books
- Practice Programming MCQs
- Apply for Programming Internship