MySQL Questions and Answers – Obtaining Database Metadata

This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses on “Obtaining Database Metadata”.

1. The general term for information about databases and the objects in MySQL is _________
a) datum
b) info
c) record
d) metadata
View Answer

Answer: d
Explanation: There are various ways in which MySQL facilitates the methods to obtain information about databases and the objects in them. For example, ‘SHOW’ statements and ‘INFORMATION_SCHEMA’.

2. Which statement is used to determine the storage engine for individual tables?
a) SHOW STATUS OF TABLE
b) SHOW STATUS TABLE
c) SHOW TABLE STATUS
d) SHOW DEFAULT STATUS
View Answer

Answer: c
Explanation: MySQL provides a method to determine the storage engine for each table with the ‘SHOW TABLE STATUS’ statement. The output of this statement is the name of the storage engine indicator.

3. INFORMATION_SCHEMA is based on the SQL standard.
a) True
b) False
View Answer

Answer: a
Explanation: ‘INFORMATION_SCHEMA’ is another way to access information about the databases and its objects (metadata). It is based on the ‘SQL standard’, although some content is MySQL-specific.
advertisement
advertisement

4. Which disk data does FILES table in INFORMATION_SCHEMA store?
a) NDB
b) NBD
c) NBK
d) NCD
View Answer

Answer: a
Explanation: The ‘INFORMATION_SCHEMA’ is a method to access information about the databases and its objects known as metadata. It has various tables that can be viewed with ‘SHOW’ statement.

5. The information about table index characteristics is stored in which table of INFORMATION_SCHEMA?
a) FILES
b) STATISTICS
c) SCHEMATA
d) VIEWS
View Answer

Answer: b
Explanation: The ‘STATISTICS’ table in the ‘INFORMATION_SCHEMA’ stores information about the table index characteristics. ‘INFORMATION_SCHEMA’ is responsible for storing database metadata.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. Which table in INFORMATION_SCHEMA stores information about storage engines and server plugins?
a) ENGINES, PLUGINS
b) FILES, PLUGINS
c) ENGINES, FILES
d) PLUGINS, STATISTICS
View Answer

Answer: a
Explanation: The ‘INFORMATION_SCHEMA’ is a very useful in MySQL. It has many tables each serving its individual purpose. The storage engine information is stored in ENGINES and plugin information in PLUGINS.

7. INFORMATION_SCHEMA is more portable than SHOW statements.
a) True
b) False
View Answer

Answer: a
Explanation: The ‘INFORMATION_SCHEMA’ is a method to access information about the databases and its objects known as metadata. Its content is MySQL-specific which makes it more portable.
advertisement

8. Which table stores information about the threads executing within the server?
a) PROCESS
b) PROCESSLIST
c) LIST
d) THREADSLIST
View Answer

Answer: b
Explanation: The table ‘PROCESSLIST’ is responsible for storing all the information about the threads executing within the server. The other tables are not valid tables in the INFORMATION_SCHEMA.

9. The command which lists databases managed by the server is _____________
a) mysqld
b) mysqlshow
c) mysqllist
d) mysqldb
View Answer

Answer: b
Explanation: The ‘mysqlshow’ command provides almost the similar information as some ‘SHOW’ statements. It also enables to extract database and table information at the command prompt.
advertisement

10. The option in mysqlshow to show information about indexes in a table is _________
a) –no-data
b) –indexes
c) –keys
d) –flag
View Answer

Answer: c
Explanation: The ‘mysqlshow’ command has various flags to provide a lot of options on displaying tables. The ‘–keys’ flag is specifically used to show information about indexes in a table.

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.