MariaDB Frequently Asked Questions in various MariaDB job interviews by the interviewer. The set of questions is here to ensure that you offer a perfect answer posed to you. So get prepared for your new job interview

1. What is MariaDB?

MariaDB Server is one of the most popular open-source relational databases. It’s made by the original developers of MySQL and guaranteed to stay open source. It is part of most cloud offerings and the default in most Linux distributions.

MariaDB is a popular fork of MySQL created by MySQL’s original developers. It grew out of concerns related to MySQL’s acquisition by Oracle. It offers support for both small data processing tasks and enterprise needs. It aims to be a drop-in replacement for MySQL requiring only a simple uninstall of MySQL and an install of MariaDB. MariaDB offers the same features as MySQL and much more.

2. What are the Features of MariaDB?

The important features of MariaDB are −

  • All of MariaDB is under GPL, LGPL, or BSD.
  • MariaDB includes a wide selection of storage engines, including high-performance storage engines, for working with other RDBMS data sources.
  • MariaDB uses a standard and popular querying language.
  • MariaDB runs on a number of operating systems and supports a wide variety of programming languages.
  • MariaDB offers support for PHP, one of the most popular web development languages.
  • MariaDB offers Galera cluster technology.
  • MariaDB also offers many operations and commands unavailable in MySQL and eliminates/replaces features impacting performance negatively.

3. Enlist some features of MariaDB?

  • It supports different Programming Languages and can run on many Operating Systems.
  • It provides Galera Cluster Technology.
  • It has more storage engines.
  • It has a quicker and more transparent security release.

4. Write the default data directory for MariaDB?

The location of the data directory is controlled by datadir a variable. The default address is /etc/mysql/my.cnf a file where MariaDBis configured to store data.

5. What is Galera Cluster in MariaDB?

Galera Cluster is a synchronous multi-master cluster for MariaDB but it is only for Linux and only supports XtraDN/InnoDB.

6. Enlist some GUI/workbench for MariaDB.

  • MySQL Workbench
  • Webyog/SQLyog
  • HeidiSQL
  • dbForge Studio

7. Why does MariaDB 10.2 use InnoDB instead of XtraDB?

Keeping up to date with Mysql, MariaDB uses InnoDB/XtraDB but it has become a very difficult task to develop. Development was already going on with InnoDB which has taken more than half a year. Thus, to release ASAP they didn’t switch to XtraDB.

8. Which command is used to create the table in MariaDB’s database?

It is done step after step. These steps are: –

  • First of all, it needs to construct a database.
  • When it is done, select the database.
  • After that create a table by commanding CREATE TABLE statement.
  • If you want to create or delete the table you must have the privilege of it

9. What is the main objective of MariaDB?

The main purpose of MariaDB is to supply a better, firm, and community-developed and also that is compatible with MySQL. It is always free DBMS on the basic level.

10. Why it is the name MariaDB?

The company says that MariaDB is a modification of MySQL. MySQL is linked to Oracle because the trademark is suggested by Oracle. Thus, the company decided to continue this trademark. As MySQL name has come from Monty’s first daughter “My”, so, for maintaining the continuity MariaDB has come from elder daughter Maria.

11. Can a normal being contribute to MariaDB?

Yes, if any person is willing to participate in contributing to the MariaDB they can do. They just have to fill out a form that will help the person to gather around his/her team to work over projects. These projects help MariaDB to be a better future. The projects are like writing or translations of KB essay types.

12. Write syntax to create a Database in MariaDB?

The syntax to create a Database in MariaDB is CREATE DATABASE. Syntax – create [or replace] database [if not exists] database_name

13. Who is the founder of MariaDB?

Michael “Monty” Widenius is the founder of MariaDB as well as the founder of MYSQL. The main focus of the MariaDB Foundation is to keep the quality of the MariaDB project high.

14. What do you mean by stored procedure?

In MariaDB, the stored procedures are basically the procedures that work as a stored program in which a particular type of parameter is allowed to pass through them but in exchange, they do not return any value.

15. How many types of procedures are available in MariaDB?

There are three types of procedures available in the MariaDB database on the basis of references and parameter overwritten, which are as follows:

  • IN procedure- In this type of procedure, the values of a parameter can be overwritten and referenced by the procedure.
  • OUT procedure- In this type of procedure, the values of parameters can be overwritten by the procedure but it can’t be referenced by a procedure.
  • IN OUT- In this type of procedure, the values of a parameter can be referenced by the procedure but they can’t be overwritten by a procedure.

16. Enlist types of JOIN’s available in MariaDB?

There are basically two types of JOIN present in MariaDB. These are as follows:

Inner join – Inner join is a type of join that works only when the conditions are satisfied. It is used to recover the rows from two or more tables.

Outer join – It can be categorized as:

  • LEFT JOIN – It works on those rows in a table where the particular conditions are satisfied. LEFT OUTER JOIN is basically useful at the time of recovering those rows which have to be carried from the left-hand table but in ON condition. It is also referred to as LEFT OUTER JOIN.
  • RIGHT JOIN – It is also known as RIGHT OUTER JOIN and works on those rows in a table where the particular conditions are satisfied. RIGHT OUTER JOIN is basically useful at the time of recovering those rows which have to be carried from the right-hand table but in ON condition.

17. List some tools of Gui/workbench For MariaDB Aria?

Some of the important tools of Gui/workbench for MariaDB Aria are as follows:

  • Webyog/SQLyog
  • HeidiSQL
  • dbForge Studio for MySQL
  • MySQL Workbench.

18. Explain temporary tables in MariaDB?

When the table is not compressed, MariaDB writes to a shared temporary tablespace as defined by the innodb_temp_data_file_path system variable.

19. What is the use of a LIKE clause in MariaDB?

In MariaDB, the LIKE clause is used with the SELECT statement to retrieve data when an operation needs an exact match.

20. How to create a table alias in MariaDB?

You can create a table alias in MariaDB with the help of the following steps:

  • First of all, it needs to construct a database.
  • When it is done, select the database.
  • After that create a table by commanding CREATE TABLE statement.
  • If you want to create or delete the table you must have the privilege of it.

21. What is the use of truncate in MariaDB?

In MariaDB, the TRUNCATE command is used only when the whole table has to be deleted or removed permanently. It is faster and also kept the record in the transaction log but it firstly eliminates the data by deallocating it which is efficient to store and record.

22. What is the use of the SUM() function in MariaDB?

In MariaDB, the SUM() function is used to sum all values in the expressions and returns the final result. In case, if there are no values in the expressions, then it returns a null value. Syntax – Select SUM from tables where conditions.

23. Enlist a few aggregate functions available in MariaDB?

Some of the aggregate functions available in MariaDB are as follows:

AVG - Returns the average value.
BIT_AND - Bitwise AND.
BIT_OR - Bitwise OR.
BIT_XOR - Bitwise XOR.
COUNT - Returns the count of non-null values.
COUNT DISTINCT - Returns the count of a number of different non-NULL values.
GROUP_CONCAT - Returns a string with concatenated values from a group.
MAX - Returns the maximum value.
MIN - Returns the minimum value.
STD - Population standard deviation.
STDDEV - Population standard deviation.
STDDEV_POP - Returns the population standard deviation.
STDDEV_SAMP - Standard deviation.
SUM - Sum total.
VARIANCE - Population standard variance.
VAR_POP - Population standard variance.
VAR_SAMP - Returns the sample variance

24. Mention the various clauses used in MariaDB?

It supports almost all types of clauses in RGDBM. For example:

  • MariaDB WHERE clause: For WHERE clause there is 4 statement depending on the selection or change of location. These four statements are INSERT, DELETE, SELECT, and UPDATE.

Syntax: SELECT field1, field2 FROM table_name1, table_name2 WHERE field LIKE conditions.

  • MariaDB Order by clause: In MariaDB, Order By clause is used to set the result in ascending or descending order.

Syntax: Select expressions from table_name Order By expression.

  • MariaDB Distinct clause: This clause is used to delete duplicate records from the table if any.

Syntax: Select Distinct from expressions.

  • MariaDB From clause: The FROM clause is used to fetch the data from the tables.

Syntax: Select columns FROM table;

25. Is user can create their own functions in MariaDB? If yes, then how?

Yes, the user can easily create the functions in MariaDB by following the syntax.

Create FUNCTION function-name [data type]
RETURNS return-datatype |Deterministic |Not Deterministic|
{contains SQL | NO SQL data}
|SQL Security (Definer | Invoker}
|Comment ‘comment-expression’
BEGIN
Declaration section
Executable section
END;

Leave a Reply