MySQL Questions and Answers – Query Mechanics

This set of MySQL Multiple Choice Questions & Answers (MCQs) focuses on “Query Mechanics”.

1. Which compiler is used to execute the structured query language?
a) DCL
b) DDL
c) DML
d) None of the mentioned
View Answer

Answer: c
Explanation: Structured query language consists of Data manipulation language as well as data definition language. Therefore DML compiler.

2. Which among the following tags belong to Data definition language?
a) SELECT
b) FROM
c) WHERE
d) All of the mentioned
View Answer

Answer: d
Explanation: Data definition language contains all tags which are used for the definition of the structures in Mysql.

3. Which among the following tags belong to Data Manipulation language?
a) UPDATE
b) ALTER
c) MODIFY
d) All of the mentioned
View Answer

Answer: d
Explanation: Data Manipulation language contains all tags which are used for manipulating the existing structure in Mysql.
advertisement
advertisement

4. Query Mechanism performs the following functions?
a) Syntax correction
b) Checking permission for executing the query
c) Checking permission for accessing the desired data
d) All of the mentioned
View Answer

Answer: d
Explanation: None.

5. What jobs “Query Optimizer” perform in Mysql?
a) Determine the efficient way to execute a query
b) Syntax errors
c) Permissions
d) All of the mentioned
View Answer

Answer: a
Explanation: Query optimizer is used to find the efficient way to execute a query in Mysql.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. What is the meaning of “EMPTY SET” in the following MySQL command?

SELECT fname, lname, person_id
FROM person
WHERE lname=’s’;
/* after Execution*/ Mysql tool RETURN EMPTY SET 0:00sec

a) No values
b) Error
c) Access denied
d) None of the mentioned
View Answer

Answer: a
Explanation: “EMPTY SET” means there were no values stored in the structure that belongs to lname.
advertisement

7. Which are the two languages used in Mysql?
a) DML/DDL
b) DDL/DCL
c) DML/DDM
d) None of the mentioned
View Answer

Answer: a
Explanation: DDL (Data Definition Language)
DML (Data Manipulation Language).
advertisement

8. The users responsible for query processing in database system are ___________
a) Native users
b) Application programmers
c) Sophisticated users
d) Specialized users
View Answer

Answer: c
Explanation: Sophisticated users interact with the system without writing any application programs; they form the request in a database query language.

9. Select the sequence for how the query mechanism works?
a) Authentication-> DDL->DML->query optimizer->output
b) DDL->DML->query optimizer-> Authentication->output
c) DML->query optimizer-> Authentication-> DDL-> output
d) All of the mentioned
View Answer

Answers: a
Explanation: When we execute any query, the first step is authentication (password). Second step for data definition mechanism, the third step is for Data Manipulation and the last is optimizer for efficient execution.

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.