Choosing a database in the official order
This page is for architects and IT teams in public bodies who decide which database runs an Exponential site. It answers which databases are supported, in which order the project recommends them, what each means for availability, backups and procurement, and how to fit the choice to a database standard your organization may already have. The support statement is Database support; the hosting view is Databases in the official order.
Contents
- The official order
- Side by side for a public body
- Matching your database standard
- Which database for which situation
- Finding out what a site runs on
- Changing later
- Checklist
The official order
Supported databases (Exponential 6.0.x), in order of preference: 1. SQLite 3 (the default) · 2. PostgreSQL · 3. MongoDB · 4. MariaDB · 5. Oracle · 6. MySQL · 7. Microsoft SQL Server and Azure SQL (more databases from 6.0.15: Choosing a database).
The order is the order of recommendation for new sites; it does not mean the later ones work less well (Databases in the official order). Microsoft SQL Server and Azure SQL are supported from 6.0.15 (Microsoft SQL Server status); an organization that only runs SQL Server can use it from that release on.
Side by side for a public body
| 1. SQLite 3 | 2. PostgreSQL | 3. MongoDB | 4. MariaDB | 5. Oracle | 6. MySQL | |
|---|---|---|---|---|---|---|
| Database server to run | none (one file) | yes | yes | yes | yes | yes |
| Several web servers on one database | no | yes | yes | yes | yes | yes |
| Replication of its own | none | yes, with point-in-time recovery | see vendor | see vendor | see vendor | see vendor |
| Read replicas used by Exponential | no | no | no | yes (UseSlaveServer) | no | yes (UseSlaveServer) |
| Backup tool | sqlite3 .backup | pg_dump | mongodump | mariadb-dump | ext:ezoracle:datapump, expdp | mysqldump |
| Tested in the project's CI | driver unit tests | yes | adapter unit tests | via the MySQL job | no | yes |
Sources: Database support and the per-engine hosting pages. Read replicas are only built in for the MySQL driver, which MariaDB shares; see Read replicas.
Matching your database standard
Many public bodies have a database standard set by central IT, with database administrators, licenses and backup tooling already in place. That often decides more than technical preference:
| Your organization standardizes on | Consider | Note |
|---|---|---|
| PostgreSQL | PostgreSQL | the recommended database server; needs pgcrypto (PostgreSQL for hosts) |
| MariaDB or MySQL | MariaDB, or MySQL | same driver; utf8mb4 and InnoDB (MariaDB for hosts) |
| Oracle | Oracle 19c or later | through the ezoracle extension and oci8 (Oracle for hosts) |
| MongoDB | MongoDB | read its documented limits first (MongoDB for hosts) |
| no database standard, one machine | SQLite 3 | nothing extra to run, license or patch |
Choosing the engine your database team already operates usually brings monitoring, backups and on-call support with it. That is worth more than small differences in features.
Which database for which situation
| Situation | Choice | Why |
|---|---|---|
| One site, one machine, small team | SQLite 3 | no database server; backups are a file operation done with SQLite's own tool |
| More than one web server must serve the site | a database server, PostgreSQL first | SQLite needs every process on one machine |
| Many editors publishing large changes all day | a database server | SQLite queues writers for one lock |
| A continuity duty that needs a standby database | PostgreSQL, or your standard server engine with its replication | SQLite has no replication of its own |
| Database-level users and grants are required by policy | a database server | SQLite's access control is the file system's |
Finding out what a site runs on
One setting decides the engine:
grep -rn "DatabaseImplementation" settings/override settings/siteaccess/*/site.ini.append.php settings/site.iniThe values are sqlite3, ezpostgresql (or pgsql), mongodb, ezmysqli and, with its extension, ezoracle
(Operating a site). The Setup > System information page shows the
database too (System information).
Changing later
A site can move to another engine; the hosting page Changing the database engine describes how. Treat it as a planned change with its own backup and test restore. Starting with SQLite and moving to PostgreSQL when a second web server is needed is a documented path.
Checklist
- To do: The chosen engine is one of the seven; Microsoft SQL Server is not assumed to work.
- To do: It matches your organization's database standard, or the exception is recorded.
- To do: Availability needs (several web servers, a standby) are compatible with the engine.
- To do: The backup tool of the engine is part of your backup plan.
- To do: The database team knows the minimum versions in Database support.
Related pages
- Hosting index of this folder
- Database high availability
- Backups per database engine
- 9 Databases in the installation book
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.