// MariaDB vs MySQL
MariaDB vs MySQL
เปรียบเทียบอย่างละเอียด — MariaDB fork จาก MySQL แต่มีฟีเจอร์ที่เหนือกว่าในหลายด้าน
📖 ประวัติย่อ
MariaDB แยกออกมาจาก MySQL ในปี 2009 หลัง Oracle เข้าซื้อ Sun Microsystems — Monty Widenius (ผู้สร้าง MySQL) ต้องการรักษาความเป็น Open Source อย่างแท้จริง ตั้งชื่อตามลูกสาวคนเล็กชื่อ Maria
// Feature Comparison
ฟีเจอร์เปรียบเทียบ
| ฟีเจอร์ | MariaDB | MySQL |
|---|---|---|
| Temporal Tables | ✅ System-Versioned (SQL:2011) | ❌ ไม่มี |
| Storage Engines | ✅ 12+ engines (InnoDB, Aria, ColumnStore, MyRocks...) | ⚠️ InnoDB, MyISAM เป็นหลัก |
| Thread Pool | ✅ ฟรีทุก edition | ❌ Enterprise only |
| Audit Log | ✅ ฟรีทุก edition | ❌ Enterprise only |
| Data-at-Rest Encryption | ✅ ฟรีทุก edition | ❌ Enterprise only |
| Galera Cluster | ✅ built-in support | ❌ ต้องใช้ 3rd party |
| Window Functions | ✅ MariaDB 10.2+ | ✅ MySQL 8.0+ |
| CTE (WITH clause) | ✅ MariaDB 10.2+ | ✅ MySQL 8.0+ |
| JSON Support | ✅ MariaDB 10.2+ | ✅ MySQL 5.7+ |
| INVISIBLE Columns | ✅ MariaDB 10.3+ | ✅ MySQL 8.0+ |
| Oracle Compatibility | ✅ SQL_MODE=ORACLE | ❌ ไม่มี |
| License | ✅ GPL v2 (100% open) | ⚠️ GPL v2 + Commercial dual |
⚠️ ความแตกต่างด้าน Syntax บางจุด
แม้ MariaDB จะ compatible กับ MySQL เป็นส่วนใหญ่ แต่มีบางจุดที่แตกต่าง เช่น JSON functions บางตัว, window functions syntax บางส่วน และ MariaDB-specific features ที่ MySQL ไม่มี