250+ TOP MCQs on Putting Perl DBI to Work and Answers

MySQL Database Multiple Choice Questions on “Putting Perl DBI to Work”.

1. RTF refers to ______________
a) Rich Text Format
b) Right Text Format
c) Rich Text Function
d) Right Text Function

Answer: a
Clarification: RTF (Rich Text Format) is a format developed by Microsoft that is understood by many word processors. MS-Word is one such program. Many others such as ‘OpenOffice’ understand it too.

2. The function returning an array of row values is ______________
a) fetchrow_array()
b) fetchrow_arrayref()
c) fetch()
d) fetchrow_hashref()

Answer: a
Clarification: The function ‘fetchrow_array()’ returns an array of row values. ‘fetchrow_arrayref()’ returns a reference to an array of row values. ‘fetch()’ is the same as fetchrow_arrayref().

3. The function returning reference to hash of row values is ______________
a) fetchrow_array()
b) fetchrow_arrayref()
c) fetch()
d) fetchrow_hashref()

Answer: d
Clarification: The function ‘fetchrow_hashref()’ returns reference to hash of row values. ‘fetchrow_arrayref()’ returns a reference to an array of row values. ‘fetch()’ is the same as fetchrow_arrayref().

4. fetchrow_hashref() returns reference to hash of row values keyed by ______________
a) row name
b) column name
c) table name
d) database name

Answer: b
Clarification: The function ‘fetchrow_hashref()’ returns reference to hash of row values, keyed by the column name. The function ‘fetchrow_arrayref()’ returns a reference to an array of row values.

5. The function returning reference to array of row values is ______________
a) fetchrow_array()
b) fetchrow_arrayref()
c) fetch()
d) fetchrow_hashref()

Answer: b
Clarification: ‘fetchrow_arrayref()’ returns a reference to an array of row values. The function ‘fetchrow_hashref()’ returns reference to hash of row values. ‘fetch()’ is the same as fetchrow_arrayref().

  250+ TOP MCQs on Performing Multiple – Table Retrievals with Joins and Answers

6. What is the maximum non zero value for FLOAT?
a) 3.402823466E+38
b) 3.402823466E+37
c) 3.402823466E+39
d) 3.402823466E+35

Answer: a
Clarification: In MySQL, each datatype has its own range. Data types give an idea of the kind of values and the ranges that a variable is allowed to store. The maximum non zero value for FLOAT is 3.402823466E+38.

7. What is the maximum non zero values for DOUBLE?
a) ±1.7976931348623157E+307
b) ±1.7976931348623157E+308
c) ±1.7976931348623157E+306
d) ±1.7976931348623157E+305

Answer: b
Clarification: In MySQL, all the datatypes have their own ranges. Data types give an idea of the kind of values and the ranges that a variable is allowed to store. The maximum non zero value for DOUBLE is ±1.7976931348623157E+308.

8. Illegal values converted to the appropriate ‘zero’ value for ______________
a) Numeric
b) String
c) ENUM
d) TIME

Answer: d
Clarification: In MySQL, there are different ways to handle the illegal values for different datatypes for default. For date or time columns, illegal values are converted to the appropriate “zero” value for the type.

9. The column attribute provides unique numbers for identification is ______________
a) AUTO_INCREMENT
b) UNSIGNED
c) IDENTIFY
d) DESCRIBE

Answer: a
Clarification: In MySQL, the mechanism for providing unique numbers is through the AUTO_INCREMENT column attribute. It enables the generation of sequential numbers automatically. This facilitates identification.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top