250+ TOP MCQs on General Preventative Maintenance and Answers

MySQL Database Multiple Choice Questions on “General Preventative Maintenance”.

1. What attempts auto recovery based on the contents of its serial log?
a) MyISAM
b) InnoDB
c) Falcon
d) TRANSACTION

Answer: c
Clarification: When the Falcon storage engine is enabled, it attempts the auto recovery based on the contents of its serial log. If the InnoDB storage engine is enabled, it checks for a variety of problems automatically.

2. How many of these can replace ‘level’ in ‘–myisam-recover = level’?

BACKUP, FORCE, QUICK

a) 0
b) 1
c) 2
d) 3

Answer: d
Clarification: To enable MyISAM table recovery, the server is started with the ‘–myisam-recover = level’ option. The value of level is a comma-separated list of the following: BACKUP, FORCE, QUICK or DEFAULT.

3. Under which option are index changes not flushed until tables close?
a) –delay-write-key
b) –delay-key-write
c) –write-key-delay
d) –key-write-delay

Answer: b
Clarification: In MySQL, the MyISAM recovery is important if the server is run with the ‘–delay-key-write’ option. Under this condition, the index changes are not flushed until the tables close.

4. Which option suppresses output unless there are errors in the table?
a) –silent
b) –wild
c) –suppress
d) –noout

Answer: a
Clarification: In MySQL, the ‘–silent’ option suppresses the output unless there are errors in the tables. The ‘cron’ jobs typically generate a mail message if a job produces any output at all.

5. What is the variable that is a handle to a database object?
a) $dbh
b) $sth
c) $fh
d) $h

Answer: a
Clarification: The variable named ‘$dbh’ is a handle to an open file. ‘$h’ is a generic handle and the meaning depends on context. ‘$dbh’ is a handle to a database object. ‘$sth’ is a handle to a query object.

  250+ TOP MCQs on Operators and Answers

6. The variable that returns code from operations that return true or false is _____________
a) $rc
b) $rv
c) $rows
d) $ary

Answer: a
Clarification: The Perl Non-handle variable ‘$rc’ returns code from operations that return true or false. ‘$rv’ returns value from operations that return an integer. ‘$rows’ returns value from operations that return a row count.

7. In PHP, how is the first element accessed if $a represents an array with numeric indices?
a) $a[1]
b) $a[0]
c) $a.1
d) $a.0

Answer: b
Clarification: If $a represents an array with numeric indices, its elements are accessed as $x[0], $x[1], and so on. In general terms, each element at the position i is accessed and used as $a[i – 1].

8. Arrays can have associative indices in PHP.
a) True
b) False

Answer: a
Clarification: The PHP arrays can even have both numeric and associative elements. For example, $x[1] and $x[“large”] can both be the elements of the same array. $x can be an object, whose elements are accessed by the arrow ‘->’ operated.

9. Which operator is used to access property of an object in PHP?
a) .
b) *
c) ->
d) @

Answer: c
Clarification: If $a represents an object, the properties it has can be accessed as $a->property-name. For instance, $a->white, $a->black, $a->blue, $a->red can be the properties of $a and accessed in this way.

Leave a Comment

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

Scroll to Top