MySQL Database Operations
- How is a stored procedure invoked?
-
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.
- Triggers and events are invoked automatically by the server.
-
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.
- 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 __________.
-
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.
- Which type stores the longest length of strings?
-
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.
- The best datatype for a column that is expected to store values up to 2 million is _________.
-
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.