MariaDB is an open-source relational database management system (RDBMS) created as a fork of MySQL in 2009 by the original MySQL developers. It remains MySQL-compatible while offering enhanced performance, additional storage engines (InnoDB, ColumnStore, Aria, MyRocks), and modern features like temporal tables, native JSON support, VECTOR search for AI workloads, and a commitment to staying fully open-source under GPL/LGPL. As of 2026, MariaDB 11.8 LTS is the current long-term support release, introducing VECTOR data type and HNSW-based vector indexing. MariaDB is widely adopted by enterprises and powers major platforms including Wikipedia, Google, and Red Hat, making it a leading choice for both OLTP and analytical workloads in cloud-native and on-premises environments.
What This Cheat Sheet Covers
This topic spans 33 focused tables and 256 indexed concepts, 198 flashcards. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
A jump-to index of every table row in this cheat sheet.
An interactive map of every table and concept in this topic.
Table 1: Data Types — Numeric
Choosing the right integer or decimal type is mostly a question of range versus storage—a TINYINT for a boolean flag wastes nothing, while a BIGINT reserves eight bytes for IDs you'll never realistically exhaust. The one rule worth tattooing on your arm: use DECIMAL for money, never FLOAT or DOUBLE, because approximate floating-point silently introduces rounding errors that destroy financial accuracy.
| Type | Example | Description | |
|---|---|---|---|
CREATE TABLE t (id INT) | • Standard 4-byte signed integer (–2,147,483,648 to 2,147,483,647) • most commonly used integer type for IDs and counters • unsigned variant extends positive range to 4,294,967,295. | ||
age BIGINT UNSIGNED | • 8-byte signed integer for very large numbers (±9 quintillion range) • unsigned variant reaches 18.4 quintillion • preferred for large-scale IDs and analytics. | ||
status TINYINT(1) | • 1-byte integer (–128 to 127 or 0 to 255 unsigned) • commonly used for boolean-like flags (0/1) and small enumerations • TINYINT(1) is a common boolean substitute. | ||
port SMALLINT UNSIGNED | • 2-byte integer (–32,768 to 32,767 or 0 to 65,535 unsigned) • efficient for medium-range values like network ports and small counts. | ||
counter MEDIUMINT | • 3-byte integer (±8 million range) • niche use between SMALLINT and INT for specific storage optimization scenarios. | ||
price DECIMAL(10,2) | • Exact fixed-point numeric stored as string internally • DECIMAL(p,s) defines precision (total digits) and scale (digits after decimal) • critical for financial calculations where rounding errors are unacceptable. | ||
score FLOAT | • 4-byte approximate floating-point • fast but subject to rounding errors • suitable for scientific data where slight imprecision is acceptable. | ||
latitude DOUBLE | • 8-byte double-precision floating-point • higher precision than FLOAT but still approximate • commonly used for GPS coordinates and scientific measurements. | ||
flags BIT(8) | • Stores bit values (1 to 64 bits) • useful for bitmasking and compact flag storage • less common than TINYINT for boolean representation. |