Data Types


  1. To maintain performance of tables having variable length rows, which statement is used?











  1. 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.


  1. Which of these columns are faster?
    Variable length, Fixed length











  1. 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.



  1. Avoiding NULL in columns may make queries simpler.











  1. 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.


  1. Which of these can be used to generate hash values?











  1. 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.



  1. If $a represents an array with numeric indices in PHP, the first element accessed by ______________.











  1. 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].