MySQL Questions and Answers – MySQL Components

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

Answer: d
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

Answer: a
Explanation: ‘mysqlcheck’ and ‘mysqlisamchk’ are the programs that perform table checking, analysis, optimization and repairs when tables become damaged. ‘mysqlcheck’ works with MyISAM tables.
advertisement
advertisement

3. The place where the server stores its databases and status files are the data directory.
a) True
b) False
View Answer

Answer: a
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

Answer: c
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).
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

5. Which statement is used to check how MySQL would execute a SELECT query?
a) TELL
b) SHOW
c) DISPLAY
d) EXPLAIN
View Answer

Answer: d
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

Answer: b
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.
advertisement

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

Answer: b
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

Answer: a
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.
advertisement

9. Which of the following is more efficient?

LOAD DATA, INSERT

a) LOAD DATA
b) INSERT
c) Same
d) Indeterminate
View Answer

Answer: a
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

Answer: b
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.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.