After getting familiar with MySQL, I wanted to work some with MariaDB as well. After MySQL was acquired by Oracle in 2009, MariaDB was created from a fork of MySQL. MariaDB is intended to stay compatible with MySQL, although each has developed features not found in the other.

Setup:
Download files are available at MariaDB Download. I’m running Windows, so I used the MSI to install. I’m running version 11.1.2.
Setup is straightforward, I just needed to set a password for the root user, then take the defaults. The defaults include the CLI tools, and the HeidiSQL tool that can be used to run queries.

Connecting:
The default port for MariaDB is 3316. I’m using DBeaver to connect.

Features:
We can run just about any MySQL command in MariaDB as well. For any objects I create, they are in the testdb database I’ve created.

We can start with getting the DB version number:

SELECT VERSION();

One interesting feature is Oracle/PL/SQL compatibility. Some Oracle commands can be used in MariaDB as is, like selecting from the Dual table:

SELECT 1 FROM Dual;

Other features can be used by setting the SQL Mode:

SET SESSION sql_mode = 'ORACLE';

We can select from a sys table using the PL/SQL syntax to limit the number of rows returned:

SELECT * FROM sys.sys_config WHERE ROWNUM < 3;

Another interesting feature is invisible columns.

CREATE TABLE testdb.test_table(
   ID int AUTO_INCREMENT NOT NULL PRIMARY KEY,
   RecordName varchar(10) NOT NULL UNIQUE,
   CreateDate timestamp INVISIBLE NOT NULL DEFAULT NOW() 
);

In this example, the CreateDate column has been marked as invisible.

INSERT INTO testdb.test_table(RecordName) 
   VALUES ('Record1');

SELECT * FROM testdb.test_table;

SELECT ID, RecordName, CreateDate FROM testdb.test_table;

Once we insert a record, a SELECT * won’t return that invisible column, although we can retrieve those values by including the column name in a SELECT.
An invisible column has to be nullable, or not nullable with a default provided.

Another feature is temporal tables. This allows us to keep track of data changes made in a table, where we can go back and see how the data looked at a specific point in time. SQL Server implements this feature, and I’ve found it to be very useful.
We can create a temporal table, add some records, then update a record:

CREATE TABLE testdb.test_temporal(
   ID int AUTO_INCREMENT NOT NULL PRIMARY KEY,
   RecordName varchar(10) NOT NULL UNIQUE
) WITH SYSTEM VERSIONING;

INSERT INTO testdb.test_temporal(RecordName) 
   VALUES ('Record1');
INSERT INTO testdb.test_temporal(RecordName) 
   VALUES ('Record2');

UPDATE testdb.test_temporal SET RecordName = 'Record3' 
   WHERE RecordName = 'Record1';

From SQL Server, I’m used to explicitly adding two date columns to mark the start and end datetimes for each record. In MariaDB, we can still do that, or we can let the default columns ROW_START and ROW_END be added automatically.
A normal select will return the current version of each record. Using SYSTEM_TIME AS OF TIMESTAMP will return the records as they looked at the specified point in time. We can use SYSTEM_TIME ALL to see the complete history.

SELECT ID, RecordName, ROW_START, ROW_END FROM testdb.test_temporal FOR SYSTEM_TIME AS OF TIMESTAMP '2023-10-21 16:49:15';

SELECT ID, RecordName, ROW_START, ROW_END FROM testdb.test_temporal FOR SYSTEM_TIME ALL;

The MariaDB site lays out several more differences between MariaDB and MySQL, as well as some incompatibilities.

In Conclusion:
The temporal table feature is definitely a good thing to have available. MariaDB may also be a good choice for people using Oracle but who want to transition to an open-source database. It may be preferable to MySQL for people wary of a corporate owned system.

Links:
Amazon – What’s the difference between MariaDB vs MySQL
Hostinger – MariaDB vs MySQL
Devart – MySQL vs MariaDB
Hackr.io – MariaDB vs MySQL