This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses on “Database Copies”.
1. The program that copies the databases from one server to another is ____________
Explanation: The utility program ‘mysqldbcopy’ is capable of copying databases from one server to another server. It can also prepare copies to make transfers on the same servers. This can be done simply by running the program.
2. Which privileges are required on the source server to use mysqldbcopy?
Explanation: To use the utility program ‘mysqldbcopy’, the user must have SELECT privileges for the database(s) on the source server and have CREATE, INSERT, UPDATE on the destination server.
3. Which option is used in mysqldump to make all tables in the destination databases to use a different storage engine?
Explanation: While using the program ‘mysqldump’ in MySQL to copy databases from server to server, all tables in the destination databases can be directed to use a different storage engine with the –new-storage-engine option.
4. The function that returns reference to hash of row values is ____________
Explanation: The function ‘fetchrow_hashref()’ returns reference to hash of row values. ‘fetchrow_arrayref()’ returns a reference to an array of row values. ‘fetch()’ is the same as fetchrow_arrayref().
5. The best datatype for a column that is expected to store values up to 2 million is _________
Explanation: 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.
6. Which type stores the longest length of strings?
Explanation: 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.
7. 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 __________
Explanation: 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.
Sanfoundry Global Education & Learning Series – MySQL Database.
To practice all areas of MySQL Database, here is complete set of 1000+ Multiple Choice Questions and Answers.