This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses on “System Variables”.
1. Which system variable when set to 1, makes all temporary tables to get stored on disk rather than in memory?
a) basedir
b) back_log
c) big_tables
d) bind_address
View Answer
Explanation: The variable ‘big_tables’ if set to 1, all temporary tables are stored on disk rather than in memory. This is a little slower but the error ‘The table tbl_name is full’ does not occur for SELECT operations that require a large temporary table.
2. The permitted value type for the variable ‘character_set_client’ is _____________
a) integer
b) float
c) double
d) string
View Answer
Explanation: ‘character_set_client’ is the character set for statements that arrive from the client. The session value of this variable is set using the character set requested by the client when client connects to server.
3. ‘character_set_database’ represents the character set used by the default database.
a) True
b) False
View Answer
Explanation: ‘character_set_database’ is the character set used by the default database. The server sets the variable whenever the default database changes. If there is no default database the variable has the same value as ‘character_set_server’.
4. Which string function returns the index of the first occurrence of substring?
a) INSERT()
b) INSTR()
c) INSTRING()
d) INFSTR()
View Answer
Explanation: The string funtion ‘INSTR()’ is used to return the index of the first occurrence of the substring. The function ‘INSERT()’ is used to insert a substring at the specified position up to the specified number of characters.
5. Which module links DBI to the web?
a) CGI.pn
b) CGI.pem
c) CGI.pm
d) CGI.po
View Answer
Explanation: The CGI.pm module is used to write scripts that use the ‘Common Gateway Interface’ protocol. It defines how a web server communicates with other programs. It provides an easy link.
6. What does CGI stand for?
a) Computer Gateway Interface
b) Common Gateway Interface
c) Computer Generated Interface
d) Common Generated Interface
View Answer
Explanation: The ‘CGI.pm’ module is so called because it helps write scripts that use the ‘Common Gateway Interface’ protocol which defines how a web server communicates with other programs.
7. The line that is written at the top of the script to write a Perl script using CGI.pm is ___________
a) use this CGI
b) put CGI
c) use CGI
d) include CGI
View Answer
Explanation: In order to write a Perl script that uses the ‘CGI.pm’ module, a ‘use CGI’ statement is included near the beginning of the script that imports the function names of the module.
8. What is the shebang line?
a) #!
b) !#
c) #$
d) $#
View Answer
Explanation: The Perl scripts are text files, which can be ceated using any text editor. All Perl scripts generally begin with a #! (shebang) line. A script is a file containing a sequence of commands.
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 MySQL Books
- Practice Programming MCQs
- Check Information Technology Books
- Apply for Programming Internship