MariaDB is currently a plug compatible replacement for MySQL, is developed by some of the original MySQL developers, and has some enhancements over MySQL.
Download MariaDB from mariadb.org.
MariaDB adds two new storage engines, PBXT and XtraDB.
PBXT is PrimeBase XT from www.primebase.org. PBXT tables offer the following advantages over stnadard MySQL MyISAM tables.
- MVCC, Multi-version concurrency control
- Transactional: support for BEGIN, COMMIT and ROLLBACK and recovery on startup.
- ACID compliant: Atomic, Consistent, Isolated, Durable (once committed changes cannot be lost).
- Row-level locking: updates use row-level locking allowing for maximum concurrency.
- Deadlock detection: immediate notification if client processes are deadlocked.
- Referential Integrity: foreign key support.
- Write-once: PBXT avoids double-writes by using a log-based architecture.
- BLOB streaming using the optional BLOB Streaming engine.
Multi-Version Concurrency Control holds multiple versions of data during updates. When you try to read data that is locked for an update, you are immediately presented with the old version. In most cases this is acceptable. If you are presenting products to a shopper, does it matter if you have 55 or 54 items in stock?
You do need something more accurate in some circumstances. If there is one item left in stock and three people buy it at the same time, you could have a problem. In theory, MVCC will give you the extra speed to clear out transactions fast enough to reduce concurency problems but you still need to allow for them.
MySQL lacked transactions forever then they added InnoDB. The alternative for transactions was PostgreSQL. Now there is PBXT.