36.
Which of the following best describes why InnoDB tables should always have primary keys and
why they should be short?
- A.BecauseInnoDB uses primary keys to locate tables, and shorter keys make quicker lookups.
- B.BecauseInnoDB uses primary keys to locate table rows, and shorter keys make quicker lookups.
- C.BecauseInnoDB stores pointers in a log to all the primary keys and shorter keys make this log smaller.
- Answer
- Report
Answer : [B]
37.
Which of the following statements are true regarding the structure of grant tables in new
distributions?
- A.They change with every upgrade.
- B.They are often changed.
- C.They remain the same for backwards compatibility.
- D.MySQL doesn't support replication
- Answer
- Report
Answer : [B]
38.
The stored function year_to_date is created by the 'root'@'localhost' account as follows:
CREATE FUNCTION year_to_date () RETURNS DECIMAL(10,2) SQL SECURITY DEFINER BEGIN ... END; Within the routine body, a number of calculations are made on data in the financials table and the calculated value is returned. The only account which can access the financials table is 'root'@'localhost'. If a client connects with the account 'joe'@'localhost' and calls the year_to_date function, what will happen?
CREATE FUNCTION year_to_date () RETURNS DECIMAL(10,2) SQL SECURITY DEFINER BEGIN ... END; Within the routine body, a number of calculations are made on data in the financials table and the calculated value is returned. The only account which can access the financials table is 'root'@'localhost'. If a client connects with the account 'joe'@'localhost' and calls the year_to_date function, what will happen?
- A.The function will not execute, as 'joe'@'localhost' does not have access to the financials table
- B.The function will not execute as SQL SECURITY DEFINER has been specified. It would execute if instead SQL SECURITY INVOKER had been specified
- C.The function will always execute as if it was 'root'@'localhost' that invoked it since SQL SECURITY DEFINER has been specified.
- D.If the account 'joe'@'localhost' has the EXECUTE privilege on year_to_date, the function will complete successfully
- Answer
- Report
Answer : [D]
39.
Which of the following best describes what MASTER_LOG_FILE and MASTER_LOG_POS
provides?
- A.The path of the log file.
- B.The file to log replication actions to.
- C.The masters binary log name used for replication.
- D.The position in themasters binary log in which to start replication.
- Answer
- Report
Answer : [C, D]
40.
How can stored routines be used to check for constraints or legality of incoming data?
- A.They can make use of the VALIDATE DEFINER setting.
- B.They can not be used to check for constraints or legality of data.
- C.They can check and only perform an action if the incoming values match a specified value.
- Answer
- Report
Answer : [C]