Chapter-27
1. MySQL’s storage engines, namely
A. ARCHIVE
B. Index
C. XLS,
D. InnoDB
E. MyISAM.
Ans: A,D,E
2. A relational database ___________ is a data structure used to store and organize information.
A. View
B. Table
C. Report
D. Stored Procedure
Ans: B
3. MyISAM tables handle transactions, meaning that you should use this type for all
of your transactional needs, so as not to incur the extra overhead required of transactional.
A. True
B. False
Ans: B
4. Which command use to view storage engine list?
A. View Engine
B. Show Storage
C. Show Engine
Ans: C
5. How Do I Convert ISAM Tables to MyISAM Tables?
A. MODIFY TABLE table_name TYPE=MYISAM;
B. ADD TABLE table_name TYPE=MYISAM;
C. ALTER TABLE table_name TYPE=MYISAM;
Ans: C
6. What is the maximum size of the VARCHAR Column type?
A. 255 Byte
B. 255 Characters
C. 512 Byte
D. 512 Characters
Ans: B
Chapter-28
1. How the Privilege System Works?
A. Authentication
B. Grant
C. Revoke
D. Authorization
Ans: A, D
2. ___________Determines whether a user is even allowed to connect to the server.
A. Authentication
B. Authorization
Ans: A
3. Where Is Access Information Stored?
A. MySQL Datbase
B. User Database
C. User Define Database
Ans: A
4. Which mysql command use to drop a user?
A. DROP from user jason@localhost;
B. Delete from user jason@localhost;
C. Delete user jason@localhost;
D. DROP user jason@localhost;
Ans: D.
5. Which mysql command use to rename user?
A. CHANGE USER jason@localhost TO jasongilmore@localhost
B. RENAME USER jason@localhost;
C. RENAME USER jason@localhost TO jasongilmore@localhost
Ans: C
Chapter- 30
1. What are the key features of MySql extension?
A. Object oriented:
B. T Embedded Client support
C. Transactional support:
Ans: A, C
2. Which Method use to select MySql Database?
A. mysqli__db (mysqli link, string dbname)
B. mysqli_select_database (mysqli link, string dbname)
C. mysqli__database (mysqli link, string dbname)
D. mysqli_select_db (mysqli link, string dbname)
Ans: D
3. Which function is responsible for closing the connection?
A. mysql_Exit (mysqli link)
B. mysql_close (mysqli link)
C. mysql_Nothing (mysqli link)
Ans: B
4. What is the diference between mysqli_fetch_object (mysqli_result result) and mysqli_fetch_array (mysqli_result result)?
A. mysqli_fetch_object except that an object is returned rather than an array.
B. Both Function are similar
C. mysqli_fetch_object except that an any value is returned rather than an array.
Ans: A
5 . commit method commits the present transaction to the database, returning TRUE on success and FALSE otherwise.
A. True B. False
Ans: A
Chapter – 31
1. A set of SQL statement stored in the database and executed by calling an assigned name within a query in known as What?
A. Stored Routine
B. Stored Function
C. Stored Tables
D. View
Ans: A
2. Stored routines have a number of advantages
A. Consistency
B. Performance
C. Reference integrity
D. Security
Ans: A, B, C
3. MySQL actually implements two procedural variants, which are collectively referred to as stored routines are
A. Stored Function
B. Trigger
C. Views
D. Stored Procedure
Ans: A, D
4. Which stored Routine support execution of SQL commands such as SELECT, INSERT, UPDATE, and DELETE?
A. Stored Function
B. Trigger
C. Views
D. Stored Procedure
Ans: D.
5. How to create a stored Routine?
A. CREATE Stored Routine get_inventory()
Select * from Student
B. CREATE PROCEDURE get_inventory()
Select * from Student
C. CREATE Routine get_inventory()
Select * from Student
D. Make PROCEDURE get_inventory()
Select * from Student
Ans: B
Chapter- 32
1. Which of the following statement is true about trigger?
A. A trigger is a task that executes in response to some predetermined event
B. A set of SQL statement stored in the database and executed by calling an assigned name
C. consists of a set of rows that is returned if a particular query is executed
Ans: A
2. A After trigger shouldn’t be used to enforce propagation or referential integrity, because it’s possible that other before triggers could execute after it.
A. True B. False Ans: B
3. Which command produces several attributes for a trigger or set of triggers?
A. SHOW TRIGGERS
B. VIEW TRIGGERS
C. DISPLAY TRIGGERS
Ans: A
4. Which statement use to delete triggers?
A. DROP TRIGGER table_name.trigger_name
B. TRIGGER table_name.trigger_name
C. DELETE TRIGGER table_name.trigger_name
Ans: A
5. Which of the following statement is correct?
A. Views are supported: A trigger can be used in conjunction with a view.
B. Transactions are not supported: A trigger can’t be involved in the beginning or conclusion of a transaction.
C. Result sets can be returned from a trigger:
Ans: B
Chapter-33
1. Which of the following statement is true about View?
A. A View is a task that executes in response to some predetermined event
B. A set of SQL statement stored in the database and executed by calling an assigned name
C. consists of a set of rows that is returned if a particular query is executed
Ans: C
2. What are the advantageous of View?
A. Simplicity
B. Security
C. Performance
D. Transaction
Ans: A,B
3. Which of the following example of creating a view?
A. Make A VIEW employee_contact_info_view AS
SELECT first_name, last_name, email, phone
FROM employee ORDER BY last_name ASC;
B. CREATE VIEW employee_contact_info_view AS
SELECT first_name, last_name, email, phone
FROM employee ORDER BY last_name ASC;
C. CREATE employee_contact_info_view from
SELECT first_name, last_name, email, phone
FROM employee ORDER BY last_name ASC;
Ans: B
4. Which statement use to show the view structure?
A. DISPLAY employee_contact_info_view;
B. DESC employee_contact_info_view;
C. DESCRIBE employee_contact_info_view;
Ans: C
5. WITH CHECK OPTION clause will prevent any subsequent view update from changing any value in the column to anything other than Columbus.
A. True B. False
Ans: A
Chapter- 34 & 35
1. Which of the following statement are correct?
A. The SQL subquery is a separate SELECT statement that is embedded in the main statement and may be executed once for each row of the result set.
B. cursor, such as its scrolling behavior and the query used to build the result set on which the cursor operates
C. MySQL’s database indexing and full-text search capabilities, and shows you how to execute Web-based database searches using PHP
D. All of Them
Ans: D
2. How to create a cursor?
A. Create cursor_name CURSOR FOR select_statement
B. DECLARE cursor_name CURSOR FOR select_statement
C. cursor_name CURSOR FOR select_statement
D. DECLARE CURSOR cursor_name FOR select_statement
Ans: B
3. For example, to limit returned query results to just the first five rows, construct the following query:
A. SELECT name, price FROM product ORDER BY name ASC MIN 5;
B. SELECT name, price FROM product ORDER BY name ASC LIMIT 5, 15;
C. SELECT name, price FROM product ORDER BY name ASC LIMIT 5;
D. SELECT name, price FROM product ORDER BY name ASC LIMIT 5,0;
Ans: C
4. _____________________ is essentially an ordered (or indexed) subset of table columns, with each row entry pointing to its corresponding table row
A. View B. An index C. Stored Routine D. Trigger Ans: B
5. What are the Advantages of MySql Database Index?
A. Uniqueness
B. Query Optimization
C. Text Searching
D. Database table search
Ans: A,B,C
Chapter- 36 & 37
1. Which of the following statement is true about Transaction?
A. A View is a task that executes in response to some predetermined event
B. A set of SQL statement stored in the database and executed by calling an assigned name
C. consists of a set of rows that is returned if a particular query is executed
D. A transaction is an ordered group of database operations that are perceived as a single unit
Ans: D
2. What is the four pillars of the transactional process ?
A. Performance B. Atomicity C. Consistency D.Isolation E.Durability Ans: B,C,D,E
3. Which statement, a command that is executed much like a query is executed within the mysql client, is used to import delimited text files into a MySQL table?
A. LOAD DATA INFILE
B. IMPORT DATA INFILE
C. DATA INFILE
D. ADD DATA INFILE
Ans: A
4. Which SQL statement is actually a variant of the SELECT query. It’s used when you want to direct query output to a text file?
A. QUERY INTO OUTFILE B . ADD INTO OUTFILE C. INTO OUTFILE D. SELECT INTO OUTFILE
Ans: D
5. The ________________is really just a command-line version of the LOAD DATA INFILE SQL query.
A. mysqlimport client B. SELECT INTO OUTFILE C. LOAD DATA INFILE
Ans: A