It can be helpful to compare and contrast two similar pieces of software, such as MySQL and MariaDB. Competition in the open business market often leads to innovation and breakthrough technology. Yet, when two competing companies go head-to-head, offering similar products and results, technological advancement may triumph, but the customer is left asking, “why this over that?”.
Recently, such a situation arose in a discussion concerning the major differences between two competing open-source relational database management systems (RDBMS), MySQL and MariaDB. In an attempt to clear things up and offer some answers to online debaters, this article will clarify exactly what separates one from the other.
Before getting into the nitty-gritty, it’s helpful to know a little history behind these two databases and where they got their start. MySQL has been a prominent database for nearly a quarter of a century, getting its start in 1994 by Swedish engineers, David Axmark, Allan Larsson and Michael “Monty” Widenius. Originally, the database was “MySQL AB,” which released its first version of MySQL in 1995. In 2008, it was purchased by Sun Microsystems and, in 2010, Sun Microsystems was acquired by the Oracle Corporation.
Upon Oracle purchasing Sun Microsystems, Widenius felt there was a conflict of interest in the deal and saw an opportunity to diverge from MySQL. Widenius then started MariaDB with a few other engineers from MySQL and began operating the MariaDB database with similar systems, but with a communal governance model.
Knowing the behind-the-scenes history of these two competing databases, we can now dive into their distinct qualities. But, in order to highlight the major differences, it’s beneficial to take a look at what makes MySQL and MariaDB so similar.
- Database Structure
- Indexes and Queries
The database structure of MySQL and MariaDB are almost identical. As a fork of MySQL, MariaDB’s database structure and indexes operate in the same way that MySQL’s do (consumers utilize the same primary stored procedures and components like tables, triggers, roles, constraints, et cetera in both systems). With this uniform database structure, users can easily switch from one product to the other without having to change their applications to fit the program. From table definition files and application programming interfaces (APIs) to client protocols and even command line tools, both programs are virtually the same when it comes to database structure.
Though the cost of utilizing indexes can become rather significant, it’s worth it when trying to enhance database performance. When it comes to indexes (INDEX, PRIMARY KEY, FULLTEXT AND UNIQUE) in MySQL and MariaDB, they both make use of B-trees (unless the indexes concern spatial data, which use R-trees). And, following suit, queries in both operating systems are identical.
Having identical database structures makes transferring data from one to the other a simple task if the user chooses to do so, but that’s about as far as the similarities go. Though a few recognizable qualities may pop-up here and there—for instance, both MySQL and MariaDB have binaries for Microsoft Windows, OS X, Linux, and FreeBSD—the two RDBMSs are very different.
- Clustering and Replication
- Development and Documentation
At the base of clustering and replication, both MySQL and MariaDB offer similar strategies. For instance, both databases have the capability for users to initiate master-master or master-slave asynchronous replication, but the way in which these commands are deployed varies between the two. Where MySQL offers MySQL Cluster technology to provide several different clustering operations, MariaDB utilizes Galera Cluster for multi-master clustering. Since the release of MariaDB 10.1 in October of 2014, Galera has been included in the software and clustering is available with a simple activation of configuration parameters.
Because MySQL is a bigger organization with a bigger staff and more developers than MariaDB, MySQL is able to expand and improve its product at a faster rate than MariaDB. Many people have made note of this including Bill Karwin, author of SQL Antipatterns: Avoiding the Pitfalls of Database Programming, and it’s obvious to see in open database development. One example of this is the current development of an Internal Data Dictionary for MySQL 8, which is sure to revolutionize metadata storage. Yet, with development and documentation being done by the Oracle Corporation, ongoing innovations and projects are closed to the public with brief releases coming out every couple of months.
On the other hand, MariaDB’s development is open to the public with decisions being debated, reviewed and initiated through a public mailing list. Innovative ideas and developmental suggestions can be submitted to MariaDB by anyone who wants to share their ideas. Along with having what is basically an open forum for development, the MariaDB Foundation is the primary manager of documentation, producing security releases throughout the developmental process.
Primary tech support and documentation for MySQL is maintained by the Oracle Corporation, which offers three different support options from a team of MySQL developers and support engineers 24/7.
For MariaDB, tech support is offered 24/7 by engineers at FromDual who claim to not only be professionals in MariaDB support but also in MySQL, Galera Cluster and Percona Server.
In operation and function, it would seem that MySQL and MariaDB are nearly the same product at their base, but that would most definitely be jumping the gun. There are vast differences to both RDBMSs and it’s worth taking note of the differences when deciding which to use. Though an open forum-type management like that seen with MariaDB may seem attractive, it may not make up for the fast-paced development, specified professional support and availability of released information provided by MySQL.