MySQL Database Operations


  1. How is a stored procedure invoked?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    In MySQL, a stored procedure is invoked using the CALL statement. A stored procedure does not have a return value but can modify its parameters. It also returns some result sets.


  1. Triggers and events are invoked automatically by the server.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    The triggers and events are invoked automatically by the server, so the concept of invoking user is not applied. Thus, they have no SQL SECURITY characteristic and always execute with definer privileges.



  1. The security context when a user creates a stored program that accesses sensitive data but forgets that other people who can invoke the object have the same access is __________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    The security context is bad if a user creates a stored program that accesses sensitive data but forgets that other people who can invoke the object have the same access to that data as its definer.


  1. Which type stores the longest length of strings?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    in MySQL, the different string datatypes are used to store different lenghts of the string. Here, the length would refer to the number of characters in the string. TEXT stores longer strings.



  1. The best datatype for a column that is expected to store values up to 2 million is _________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    The different numeric types used in MySQL are used to store different range of values. To store values of the order of a million, the MEDIUMINT or BIGINT datatype is sufficient.