Data Types
- To maintain performance of tables having variable length rows, which statement is used?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
In the variable length rows, there is more fragmentation of the table on which many deletes or updates are performed. OPTIMIZE TABLE is run periodically to maintain performance.
- Which of these columns are faster?
Variable length, Fixed length
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
The fixed length columns are faster and take more space. CHAR(n) columns take n characters per value because the values are padded with trailing spaces when stored in the table.
- Avoiding NULL in columns may make queries simpler.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
In MySQL, avoiding the NULL in columns may make the queries simpler, since it is not required to check for NULL as a special case. Simpler queries generally can be processed more quickly.
- Which of these can be used to generate hash values?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
The hash values can be generated by using the function: MD5(). SHA1() or CRC32() can also be used to do the same. Custom hash values can also be created using logic within the application.
- If $a represents an array with numeric indices in PHP, the first element accessed by ______________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
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].