This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses on “Using the Embedded Server Library”.
1. The embedded server library containing the MySQL server linkable into applications is _______________
Explanation: MySQL includes an embedded server library, libmysqld, containing the MySQL server in a way that can be linked into applications. This enables the production of MySQL-based standalone applications.
2. When building from source, the embedded server library is enabled by _______________
Explanation: While building from the source, the embedded server library is enabled by using the option ‘–with-embedded-server’ while running ‘configure’. This applies equally to MySQL 5.0 and 5.1.
3. An embedded application includes the server side only.
Explanation: In MySQL, an embedded application includes both a client side and a server side, in order that it can process one group of options for the client, and another group for the server.
4. Converting a client/server application to embedded server is simpler.
Explanation: Writing an application that uses the embedded server is different from writing one that operates in a client/server context. A program that is written as a client/server application can easily be converted to use the embedded server.
5. Which of the options executes all SQL statements in a SQL script irrespective of the number of errors?
Explanation: If SQL queries in a file are run using mysql in batch mode, mysql either quits after the first error. If the –force option is specified all the queries are executed indiscriminately.
6. Which clause is used to display information that matches a given pattern?
Explanation: The ‘LIKE’ clause filters information that match a given pattern. ‘WHERE’ clause selects information that is specified by a condition. ‘IS’ is used to match the exact condition specified.
7. Comparing a known value with NULL results into _______________
c) a positive value
d) a negative value
Explanation: In MySQL, NULL is not comparable to other known values. It will result in a NULL when compared to any value. The following statement would result in four NULLs: ‘SELECT NULL = 0, NULL < 0, NULL <> 0, NULL > 0′.
8. Which is the command to move the cursor to the beginning of line in mysql input editor?
Explanation: Control-A moves the cursor to the beginning of the line. Ctrl-E moves the cursor to the end of the line. Control-D deletes the character under the cursor whereas Esc-a is not valid.
9. The name of the option file in Unix is __________
Explanation: In Unix an option file is set up by creating a file named ‘~/.my.cnf’ in the home directory. ‘C:\my.ini’ is the option file that is setup in Windows. An option file stores the connection parameters.
10. System variable in MySQL server that enables to configure the SQL mode is __________
Explanation: The system variable ‘sql_mode’ is used by the MySQL server to configure the SQL mode. It has an impact on various aspects of the SQL statement executions. The other variables do not exist in the server.
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.