Data Types


  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. To minimize disk I/O, which of these should be chosen?
    CHAR, VARCHAR











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    In MySQL, because CHAR on average takes more space than VARCHAR, VARCHAR is preferred to be used to minimize the amount of the storage and disk I/O needed to process the rows.



  1. Which of these take more space?
    Variable length columns, Fixed length columns











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    In MySQL, 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. 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. 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.