MariaDB MCQ Questions And Answers
MariaDB MCQs : This section focuses on "Basics" of MariaDB. These Multiple Choice Questions (MCQ) should be practiced to improve the MariaDB skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.
1. MariaDB is a fork of the MySQL?
A. Centralised database
B. Personal database
C. Relational database
D. NoSQL database
View Answer
Ans : C
Explanation: MariaDB is a fork of the MySQL relational database management system.
2. Which term refers to storing data twice in order to accelerate the system?
A. Redundancy
B. Row
C. Primary Key
D. Referential Integrity
View Answer
Ans : A
Explanation: Redundancy : This term refers to storing data twice in order to accelerate the system.
3. MariaDB Initial release?
A. 2008
B. 2009
C. 2010
D. 2011
View Answer
Ans : B
Explanation: Initial release: 29 October 2009
4. Which term refers to ensuring all foreign key values point to existing rows?
A. Compound Key
B. Referential Integrity
C. Foreign Key
D. Index
View Answer
Ans : B
Explanation: Referential Integrity : This term refers to ensuring all foreign key values point to existing rows.
5. Which of the following is not features of MariaDB?
A. All of MariaDB is under GPL, LGPL, or BSD
B. MariaDB offers Galera cluster technology.
C. MariaDB uses a standard and popular querying language.
D. None of the above
View Answer
Ans : D
Explanation: All of the above is a feature of MariaDB.
6. Which command is used Sets the current default database?
A. db database_name
B. maria database_name
C. use database_name
D. mariaDB database_name
View Answer
Ans : C
Explanation: USE [database name] : Sets the current default database.
7. Which command is used to Provides table index information relating to the specified table?
A. SHOW INDEX FROM TABLENAME [table name]
B. SHOW INDEX FROM TABLENAME
C. SHOW INDEX FROM [table name]
D. SHOW INDEX TABLENAME [table name]
View Answer
Ans : A
Explanation: SHOW INDEX FROM TABLENAME [table name] : Provides table index information relating to the specified table.
8. We can disconnect from MariaDB through?
A. pop
B. break
C. end
D. exit
View Answer
Ans : D
Explanation: Disconnect from MariaDB through the exit command : mysql> exit
9. PHP provides the ___________ function for opening a database connection.
A. connect()
B. mariadb_connect()
C. mysql_connect()
D. maria_connect()
View Answer
Ans : C
Explanation: PHP provides the mysql_connect() function for opening a database connection. It uses five optional parameters, and returns a MariaDB link identifier after a successful connection, or a false on unsuccessful connection.
connection mysql_connect(server,user,passwd,new_link,client_flag);
10. PHP provides the ___________ function for closing database connections.
A. close()
B. mariadb_close()
C. mysql_close()
D. maria_close()
View Answer
Ans : C
Explanation: It also provides the mysql_close() function for closing database connections, which uses a single parameter.
bool mysql_close ( resource $link_identifier );
11. Which parameter specifies that on a second call to mysql_connect() with identical arguments, rather than a new connection, the identifier of the current connection will be returned?
A. server
B. new_link
C. user
D. client flags
View Answer
Ans : B
Explanation: new_link : This optional parameter specifies that on a second call to mysql_connect() with identical arguments, rather than a new connection, the identifier of the current connection will be returned.
12. Which data type represents integers in the signed range of -8388608 to 8388607, and the unsigned range of 0 to 16777215?
A. SMALLINT
B. MEDIUMINT
C. INT
D. BIGINT
View Answer
Ans : B
Explanation: MEDIUMINT : This data type represents integers in the signed range of -8388608 to 8388607, and the unsigned range of 0 to 16777215.
13. DOUBLE also known as?
A. Real
B. Double Precision
C. Both A and B
D. None of the above
View Answer
Ans : C
Explanation: DOUBLE (also REAL and DOUBLE PRECISION) : This data type represents normal-size, floating-point numbers of the value 0.
14. Which data type represents a string object having only a single value from a list?
A. ENUM
B. SET
C. TEXT
D. VARBINARY
View Answer
Ans : A
Explanation: ENUM : This data type represents a string object having only a single value from a list.
15. How many parameter mysql_select_db command has?
A. 2
B. 3
C. 4
D. 5
View Answer
Ans : A
Explanation: PHP provides the mysql_select_db function for database selection. The function uses two parameters, one optional, and returns a value of “true” on successful selection, or false on failure.
16. MariaDB does not runs on a number of operating systems and do not supports a wide variety of programming languages.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : B
Explanation: MariaDB runs on a number of operating systems and supports a wide variety of programming languages.
17. MariaDB does not support for PHP, one of the most popular web development languages.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : B
Explanation: MariaDB offers support for PHP, one of the most popular web development languages.
18. What are the types of JOIN in MariaDB?
A. Inner Join
B. Outer Join
C. Left Join
D. All of the above
View Answer
Ans : D
Explanation: All of the above are the types of JOIN in MariaDB.
19. What are the different types of clauses used in MariaDB?
A. MariaDB Where Clause
B. MariaDB Like Clause
C. MariaDB Where Clause and MariaDB Like Clause
D. None of the above
View Answer
Ans : C
Explanation: MariaDB Where Clause and MariaDB Like Clause are the different types of clauses used in MariaDB.
20. What are the types of aggregate functions in MariaDB?
A. MariaDB COUNT Function
B. MariaDB SUM Function
C. MariaDB MIN Function
D. All of the above
View Answer
Ans : D
Explanation: All of the above are the types of aggregate functions in MariaDB.
Discussion