Best databases for government and public sector: which option fits which workload
For a government body that must keep records inside its own infrastructure, PostgreSQL is the default starting point for records systems because its PostgreSQL License is permissive, similar to BSD or MIT, its versioning policy publishes support windows for each major release, and its upgrade documentation covers major moves. Check the calendar on the day you pick a version: PostgreSQL 14's final release date was November 12, 2026, so start on a release still in support, such as 18, which is supported until November 14, 2030. For major upgrades, the documented options are pg_upgrade, a dump and restore, or logical replication, which the documentation says allows a major upgrade with only several seconds of downtime. Ask your DBA to rehearse the chosen path on a production copy first.
MySQL, TimescaleDB and Redis Open Source are narrower fits, each with a license or edition condition to check. MySQL Community Edition is available under the GPL, and its LTS tracks, such as 8.4 and 9.7, follow Oracle's Lifetime Support Policy, while Innovation releases are supported only until the next Innovation release, so a records system belongs on an LTS line. Confirm which Enterprise Edition features you need and their terms. TimescaleDB, a PostgreSQL extension for time-series data, has an Apache 2 Edition, but continuous aggregates, the columnstore and retention policies are in the Community Edition under the Timescale License, which allows running it on your own infrastructure but not offering it as a service. Redis Open Source 8 can be used under RSALv2, SSPLv1 or AGPLv3, so choose AGPLv3 if an OSI-approved license is required, since Redis 7.4 to 7.8 use RSALv2 or SSPLv1, neither OSI-approved.
MongoDB Atlas and Redis Cloud are managed commercial services, and they help only if an approved cloud region and hosting model are allowed for your data. Before any trial with live records, confirm the region, the tenancy model and where backups go: Redis Cloud writes backups to AWS S3, Google Cloud Storage, Azure Blob Storage or a customer-configured FTP or FTPS server, and Free plans cannot back up through the console. Self-managed MongoDB ships under the Server Side Public License for releases after October 16, 2018, which is not OSI-approved, so ask procurement to review that license early. State plainly that no database on this list is a compliance certification. Encryption, access control, audit logging and tested restores are controls you configure and evidence yourself. DeployOpen can harden them and prepare the evidence, but independent auditors and certification bodies issue any report or certification.
Which of the best databases for government and public sector fits each workload
This table matches six common government workloads to the database that usually fits them. Read each row from the scenario to the best fit, then check the condition in the last column before shortlisting. Licenses, support windows and managed-service approval often decide the answer more than features do.
| Scenario | Best fit | When it makes sense |
|---|---|---|
| Case and records systems that need transactions and relational integrity | PostgreSQL | Choose when you need transactions, constraints and referential integrity. The PostgreSQL License is permissive. Confirm your major version is still supported. |
| Existing MySQL estates or vendor applications that require MySQL | MySQL Community Edition, LTS track | Pick the LTS track for production so point releases carry fixes only. Community is GPL; Enterprise adds paid features. Confirm vendor certification for your version. |
| Sensor, telemetry or event data inside an existing PostgreSQL estate | TimescaleDB, Community Edition | Fits an existing PostgreSQL estate. Columnstore, continuous aggregates and retention need Community Edition. Check Timescale License terms before use. |
| Caching, sessions and fast key lookups | Redis Open Source 8 | Fits in-memory caching and sessions on self-hosted infrastructure. Redis 8 is offered under RSALv2, SSPLv1 or AGPLv3: confirm the license choice. |
| Document data model where an approved managed cloud exists | MongoDB Atlas, or Redis Cloud for caching | Pick when your approved cloud and residency rules cover the managed service. Confirm backups: Redis Cloud Free plans cannot back up or export. |
| Document data model where no managed cloud is approved | MongoDB Enterprise Advanced, self-managed | Fits when data must stay in your infrastructure. Pricing comes from sales. Server is under SSPL, which the OSI does not approve. |
What each open-source database is and the license it ships under
These five databases ship under different terms. The license decides who may run the software, whether you can offer it as a service, and whether it meets the OSI-approved open-source definition that some procurement policies ask for. Check the license for the exact version and edition your team will deploy, because terms can change between releases.
PostgreSQL under the PostgreSQL License
PostgreSQL is released under the PostgreSQL License, a permissive license similar to BSD or MIT. A new major version ships about once a year, and each one is supported for five years after its first release, so you can plan upgrades against published end dates. Support for version 14 ended on November 12, 2026, so check which major version each system runs. Confirm which vendor or distribution will patch your chosen major version, and for how long.
PostgreSQL licence pageMySQL Community under the GPL
MySQL Community Edition is freely downloadable and available under the GPL. Its releases follow two tracks: an LTS track, where premier support runs five years and extended support three more under the Oracle Lifetime Support Policy, and an Innovation track, supported only until the next Innovation release. The Enterprise Edition is a separate commercial product, so confirm which features your agency needs are in Community and which need the paid edition.
MySQL Community pageTimescaleDB with split licensing
TimescaleDB is a PostgreSQL extension for time-series and event data whose license depends on which files you deploy. Code outside the tsl directory is under the Apache License 2.0, while code inside it and the -tsl shared objects fall under the Timescale License, which is not OSI-approved. Under that license you can run Community Edition for free in your own on-premises or cloud infrastructure, but you cannot offer it as a service. Confirm with Tiger Data that your deployment model is covered by the Timescale License.
Redis Open Source 8 license choice
From Redis 8.0, you choose the license under which you use Redis Open Source: RSALv2, SSPLv1 or AGPLv3. AGPLv3 is the OSI-approved option, while Redis 7.4.x to 7.8.x are dual RSALv2 or SSPLv1, and neither of those is OSI-approved. The Intel SVS-VAMANA vector optimizations are closed source and usable only under RSALv2, so the license choice can also determine which features you get. Confirm with Redis which license terms apply to the exact version and features your agency will run.
MongoDB Atlas under commercial terms
MongoDB Atlas is a commercial managed service, so your agency consumes the database as a hosted product. The server is under the Server Side Public License v1.0 for releases after October 16, 2018, which is not OSI-approved, while earlier releases fall under AGPL v3.0. For self-managed deployments, MongoDB sells Enterprise Advanced as its commercially licensed route, priced through sales. Confirm with MongoDB which license governs the server version your Atlas cluster runs and what terms apply if you move to self-managed hosting.
Which license terms and paid editions change the shortlist
The license a database ships under decides what your agency can do with the software without asking the vendor, so it belongs early in the shortlist, alongside performance and security. The PostgreSQL License is a liberal open-source license similar to the BSD or MIT licenses, and it carries the fewest conditions when you modify, distribute or run the software. Other candidates add conditions that apply to specific builds and uses. Before scoring any database, ask counsel to write down your planned uses: internal use, changes to the code, copies given to contractors or other agencies, and any offer of the database as a hosted service.
TimescaleDB shows how one product can carry two licenses. Source code outside the tsl directory is under the Apache License 2.0, while code inside it, and built shared object files with -tsl in their names, is under the Timescale License. Under that license you can install TimescaleDB Community Edition in your own on-premises or cloud infrastructure and run it for free, but you cannot offer it as a service. The Apache 2 Edition can be sold as a service, but continuous aggregates, the columnstore (Hypercore), data retention policies, job scheduling and time_bucket_gapfill are Community Edition features only. A shared database service for several agencies raises a question this page cannot settle: does running one instance for multiple agencies count as offering it as a service? Put that question to counsel in writing, with the intended operating model described, before the design assumes either answer.
MySQL Community Edition is available under the GPL and includes InnoDB Cluster, Group Replication with automated failover, MySQL Router and MySQL Shell. MySQL Enterprise Edition is the commercial edition from the same vendor, so get the written license terms, the feature list and the support terms from Oracle before comparing it with Community. Redis is more sensitive to version. Redis 8.0 and later can be used under RSALv2, SSPLv1 or AGPLv3, at your choice, so a self-managed deployment can use the OSI-approved AGPLv3. The Intel SVS-VAMANA vector optimizations are closed source and usable only when Redis Open Source is distributed under RSALv2, so choosing AGPLv3 means those optimizations are not available under that choice. Redis 7.4.x to 7.8.x are dual RSALv2 or SSPLv1, neither OSI-approved, so confirm the exact version and license with counsel before the build is pinned.
How the best databases for government and public sector compare on capabilities
This table compares licensing, paid tiers, high availability, backup, upgrades, stated uptime and entry cost across the databases most often shortlisted for government and public sector work. Read each row against your hosting model, since Redis Cloud and MongoDB Atlas are vendor-run services while the open-source builds run in your own infrastructure. The main takeaway: open-source builds leave backup design and recovery testing to your team, so weigh that operating work alongside the license cost.
| Capability | PostgreSQL and TimescaleDB | MySQL Community | Redis and MongoDB Atlas |
|---|---|---|---|
| License | PostgreSQL License, similar to BSD or MIT. TimescaleDB: Apache 2.0 outside the tsl directory, Timescale License inside it. | GPL for MySQL Community Edition. Confirm the GPL obligations with your legal team before you embed it. | Redis 8: RSALv2, SSPLv1 or AGPLv3, your choice. MongoDB server after October 16, 2018: SSPL v1.0. Ask both vendors which terms cover hosted use. |
| Paid editions or tiers | PostgreSQL: community project with third-party support. TimescaleDB: continuous aggregates and columnstore need the Community Edition, which the Apache 2 Edition lacks. | MySQL Enterprise Edition is the paid option. Ask the vendor for its price and support terms. | Redis Cloud: Free, Essentials and Pro tiers. Atlas: Free, Flex and Dedicated. Enterprise Advanced for self-managed MongoDB. |
| High availability (open-source build) | PostgreSQL documents replication and failover; you choose the automation tooling. TimescaleDB runs on PostgreSQL, so confirm its HA setup. | InnoDB Cluster and Group Replication with automated failover, included in Community Edition. | Redis Cloud Pro offers Active-Active multi-region databases. Open-source Redis 8 and Atlas HA setups: confirm with vendors. |
| Backup and recovery | PostgreSQL: continuous archiving and point-in-time recovery. TimescaleDB: confirm backup tooling for its Community Edition. | Confirm which backup and point-in-time recovery tools to use with your MySQL setup. | Redis Cloud Pro: on demand or every 24, 12, 6, 4, 2 or 1 hours. Essentials: every 24 hours. Free plans cannot back up. |
| Major upgrade path | PostgreSQL: pg_upgrade, dump and restore, or logical replication, which needs only several seconds of downtime. Confirm TimescaleDB upgrade steps. | LTS track (8.4, 9.7) and Innovation track. Innovation releases get support only until the next one. | Atlas: mongodump restores only into the same major version or feature compatibility version. Confirm Redis upgrade paths with the vendor. |
| Vendor-stated uptime | Depends on your own design and hosting. Ask any support provider for a written availability figure. | Depends on your own design and hosting. Ask the vendor for written availability terms if you buy Enterprise Edition. | Redis pricing page: Pro up to 99.999%, Essentials up to 99.99% with basic support. Ask Atlas for its tier uptime. |
| Lowest entry point | PostgreSQL: no license fee. TimescaleDB Community Edition runs free in your own infrastructure; it cannot be offered as a service. | MySQL Community Edition: no license fee, freely downloadable under GPL. | Redis Cloud Free: $0 for one 30 MB database. Atlas Free: $0 with 512 MB storage. |
What running each database in your own infrastructure asks of your team
PostgreSQL is one of the more predictable systems here to operate, but only if your team keeps to its release cadence. You own the server, the upgrade calendar and the backups, and the project's versioning policy sets the pace.
- Minor releases: Minor releases never change the internal storage format, so applying one means replacing the executables and restarting the server. Minor releases arrive at least once every three months, so keep a recurring patch window.
- Major versions: A new major version arrives about once a year, and each receives five years of support after its first release. Schedule each upgrade well inside that window.
- Support cutoff: PostgreSQL 14's support window ended on November 12, 2026. Any cluster still on version 14 is now past its support window and needs an upgrade plan immediately.
- Major upgrade method: Dump and restore, pg_upgrade and logical replication are the documented routes. The upgrade documentation explains that logical replication works between major versions and can keep switchover downtime to several seconds.
- Recovery and high availability: Replication, failover, point-in-time recovery and connection pooling are documented but not preconfigured. Your team designs, tests and monitors each of them.
Check the major version of every cluster against its support dates, then confirm who approves the upgrade window and who runs the restore test.
MySQL's operating load depends mostly on the release track you choose, because the two tracks have different support lengths and upgrade rhythms. For a system you expect to run for years, the LTS track is the one to plan around.
- LTS support: The current LTS lines listed on the download page are 8.4 LTS and 9.7 LTS. Under the Oracle Lifetime Support Policy, each LTS release gets 5 years of premier support and 3 years of extended support. The MySQL 8.4 reference manual covers the release model in detail.
- Innovation track: Innovation releases are supported only until the next Innovation release, so each one starts a short upgrade cycle. The download page currently lists 26.7.0 as an Innovation release.
- Feature timing: Features are added or removed only in the first release of an LTS series, such as 8.4.0. Later LTS point releases carry only necessary fixes, so feature changes arrive once per series and point releases are the lower-change path.
- Built-in high availability: The Community Edition includes InnoDB Cluster, Group Replication with automated failover, MySQL Router, MySQL Shell and replication. Your team assembles, tests and operates that stack.
- Commercial support: MySQL Enterprise Edition is a separate commercial offering. Confirm what it adds before you assume you need it.
Confirm which track your application drivers support, and whether your operating model needs the commercial edition for vendor support.
TimescaleDB adds a second layer to every operation. Because it is a PostgreSQL extension, your team runs PostgreSQL operations and TimescaleDB upgrades together, and the extension version has to match the PostgreSQL version.
- Version pairing: Match the TimescaleDB version to the PostgreSQL major version before you upgrade either component. Plan the two upgrades as one change, and test a restore on the new pair.
- Release tracking: TimescaleDB 2.30.2 was published on September 29, 2026. Follow the timescale/timescaledb repository for new releases, since each one is an upgrade your team must test.
- Edition affects features: Continuous aggregates, the columnstore (Hypercore), data retention policies, job scheduling and
time_bucket_gapfillare available only in Community Edition, and the Apache 2 Edition does not include them. - Self-hosting license: Under the Timescale License you can run Community Edition for free in your own on-premises or cloud infrastructure, but you cannot offer it as a service. If your team hosts it for other organizations, have counsel review the terms.
- Inherited PostgreSQL tasks: Backups, replication, failover and connection pooling remain your team's work on top of extension management.
Confirm which features your pipelines need and which edition provides them, then schedule PostgreSQL and TimescaleDB upgrades as a single change.
Redis Open Source 8 is self-managed, so running the server is the simpler part. Your team designs, tests and runs persistence, replication and backups, and it must absorb security releases on its own schedule.
- Persistence: Decide how data is persisted and how much loss is acceptable, then set the matching options, such as
appendonlyandsave, and document the choice for auditors. - Replication and failover: Your team builds and tests replicas and failover. Rehearse a failover before go-live, not only on paper.
- Backups: You own the snapshot schedule, storage location, encryption and restore tests. A backup that has never been restored is an untested control.
- Security releases: Redis 8.10.2 was released on September 17, 2026 as a security release. Track the redis/redis releases page and keep a patch path that can move quickly for security fixes.
- License selection: Redis 8 and later are available under RSALv2, SSPLv1 or AGPLv3, and AGPLv3 is OSI-approved. The Intel SVS-VAMANA vector optimizations are closed source and usable only when Redis Open Source is distributed under RSALv2, so confirm your license with counsel.
Ask your team for a written runbook covering persistence settings, failover tests, restore tests and the security patch window before go-live.
With MongoDB Atlas and Redis Cloud, the vendor operates the cluster, so your team's work shifts to configuration decisions. Tier, backups, region and access each carry cost and compliance consequences, and your team sets each one.
- Tier choice: MongoDB's pricing page lists Atlas Free with 512 MB of storage, Flex from $0.011 per hour up to $30 a month, and Dedicated from $0.08 per hour. Redis's pricing page lists Redis Cloud Pro with a $200 monthly minimum on dedicated infrastructure. Compare what each tier includes, since backups and uptime differ by plan.
- Backup settings: Redis Cloud Pro subscriptions can back up on demand and at intervals from 24 hours down to 1 hour. Paid Essentials plans back up every 24 hours, and Free plans cannot back up or export through the console. Backups are RDB files saved to AWS S3, Google Cloud Storage, Azure Blob Storage or an FTP or FTPS server you configure.
- Region selection: Region sets where data is stored and processed. Confirm which regions each tier offers and whether they meet your residency rules.
- Access configuration: Your team defines users, roles, network access and credential rotation. Redis's pricing page lists private connectivity on Pro, and you should confirm which access controls each MongoDB Atlas tier includes.
- Uptime commitments: Redis's pricing page lists up to 99.999% uptime on Pro and up to 99.99% on Essentials with basic support. Read the written terms for the tier you buy.
Effort depends on your team's skill with each platform, and it is fixed only once the scope is agreed in writing, so list each configuration and review task in that scope.
The decision path from workload to shortlisted database
The path starts with the data type: relational, time-series, cache or document. The first check is whether the data can stay in a self-hosted deployment inside the agency boundary. If it can, relational data goes to PostgreSQL or MySQL Community, time-series data goes to TimescaleDB when it already lives in PostgreSQL, and cache data goes to Redis Open Source 8 once the AGPLv3 choice is confirmed. If it cannot, an approved managed cloud takes cache or document workloads to MongoDB Atlas or Redis Cloud. A document model that must stay self-managed goes to MongoDB Enterprise Advanced. Every path ends at one check: license and edition confirmed in writing, backup and restore tested, and evidence collected for the assessment team.
Routes a workload from data type to one shared license and restore check.
How to shortlist and pilot a database for a government workload
This five-step sequence moves from data classification to a written scope, so every database option is judged against the same requirements before any money is committed. Each step names who is involved and what it produces, so later reviewers can trace each decision back to evidence.
Classify the data and fix the hosting boundary
The security owner, the records owner and the business owner of the dataset agree on the data classification, the retention obligations and where the database may run: a named cloud account, an on-premises data center or an air-gapped network. The boundary comes first because it decides which hosted services are eligible at all. Output: a short written classification and boundary statement signed by the security and records owners. Done when every later option is checked against that document and nothing else.
Shortlist two options from the scenario table
The platform or data architecture lead picks two candidates from the scenario table on this page, using the boundary from step one as the filter. A managed service such as MongoDB Atlas or Redis Cloud stays in the list only if the boundary allows that hosting model. A self-managed option stays only if the team can run its backups, patching and failover. Check version support dates too: the PostgreSQL versioning policy lists version 14 as supported to November 12, 2026, so a new deployment should start on a version that is still in support. Output: two named candidates, each with one sentence on why it fits the boundary and the workload.
Get license, edition and feature answers in writing
The procurement lead sends each vendor the same written question set and collects written answers before any pilot starts. Ask which features sit in which edition and under which license, covering SSO, audit logging, encryption at rest and in transit, key management, and backup and restore options. Licensing and edition terms change, so confirm them in writing rather than assuming them. For example, TimescaleDB lists continuous aggregates and the columnstore only in its Community Edition under the Timescale License, which matters if the team plans to use the Apache 2 Edition. Output: an answer sheet per vendor with a named contact and a date for each item. Done when every item is answered or logged as a gap the pilot must close.
Pilot on a disposable copy of the data
The database engineer loads a copy of the data into a disposable environment, separate from production and inside the agreed boundary, with masking or minimization wherever the records owner requires it. The team restores a backup into a fresh instance, tests failover by stopping the primary, and rehearses a major version upgrade on the copy. For PostgreSQL, record which upgrade path the team can support, since the PostgreSQL upgrade docs describe several. Output: a pilot log with the restore, failover and upgrade results, each with the commands and versions used. Done when someone outside the pilot team can repeat each test from the runbook alone.
Write the scope, request quotes and collect evidence
The project lead writes the scope from the pilot results, covering the hosting boundary, the configuration to deliver, the backup and restore tests, the upgrade plan, and who operates the platform after go-live. Every vendor or implementation partner quotes against that same written scope, so the quotes can be compared on equal terms. DeployOpen scopes most engagements as fixed scope agreed in writing before work starts, and its quotes follow from that document. Output: a signed scope, comparable quotes, and a configuration evidence pack with settings, versions, access controls, audit log configuration and backup test records, confirmed in advance with the assessor who will review it.
What do buyers ask before they bring in outside help on a database?
What drives the cost of self-hosting PostgreSQL or MySQL?
Community editions carry no license fee, so the cost sits in the surrounding work. PostgreSQL is released under the PostgreSQL License, and MySQL Community Edition is freely downloadable under the GPL. The main cost lines are infrastructure (compute, storage, backup storage and network links), staff time for patching, monitoring and failover testing, and any vendor support contract you choose to buy, which usually recurs. Implementation work is a separate one-time cost. DeployOpen does not publish prices. A quote follows from the written scope, so list the systems, environments, data volumes and evidence you need before asking for one.
How long does a database migration or upgrade take?
It depends on three inputs: data volume, the number of applications connected to the database, and how much downtime your services can tolerate. The PostgreSQL upgrade documentation describes logical replication, which works between different major versions and allows a major upgrade with only several seconds of downtime. Application cutover testing usually takes longer than that, because connection strings, drivers, batch jobs and rollback steps all need checking. Ask for a written migration plan that lists the assumptions behind each step, the test environments used, and the rollback point before agreeing any date.
Can our own database team run PostgreSQL or MySQL without outside help?
Yes, if your team can own the operating work end to end. That means patching on a fixed calendar, tested backups with point-in-time recovery, failover drills and restore tests that you record as evidence. The PostgreSQL high availability documentation lays out the replication and failover options your team would need to choose between. Your team also needs runbooks for failover and restore, an upgrade calendar tied to the supported version list, and someone on call who can act on alerts. If one or more of these has no clear owner today, an outside team can help build the runbooks, restore tests and calendar, then hand them over.
When is a managed cloud database acceptable for government data?
It depends on three things: whether the provider offers a region on your approved list, how your data is classified, and which assessment rules apply to the system. Confirm each point with the vendor in writing, then review the same facts with your assessor before any regulated data goes into a managed service. Ask where backups, logs and support access are held, who can reach the control plane, and how encryption keys are managed. Those answers decide whether a managed deployment fits. Self-hosting in your own cloud account or data center keeps these answers in your hands, but it also moves patching, backups and failover back onto your team.
Does DeployOpen certify our database for compliance?
No. DeployOpen does not certify databases or issue audit reports, attestations or certifications. What DeployOpen does is prepare the system, its controls and the evidence an assessor will ask for, such as configuration records, access reviews, backup and restore test results, and audit logging settings. Independent auditors and certification bodies review that evidence and issue the reports or certificates, if the framework provides them. Before you start, ask your assessor which evidence they expect, which control framework applies, and whether they accept self-hosted systems in your environment. Scope and deliverables are agreed in writing before any work starts.
What should we ask a database vendor for in a quote?
Ask for the written terms and assumptions behind the price, so every quote is compared on the same basis. Start with the license terms: which license covers each component and which features sit only in a paid edition. Then ask for the editions being quoted, the support windows and what is included, and the backup features, including who runs restore tests. Add the migration assumptions in writing: data volume, source and target versions, downtime tolerance and who performs cutover testing. DeployOpen quotes follow from a written scope, so give each vendor and each implementation partner the same list of systems, environments and deliverables.
How DeployOpen scopes and delivers a database selection and implementation
DeployOpen helps government and public sector teams turn a database shortlist into a self-hosted deployment inside their own infrastructure, whether in their cloud accounts, data centers or air-gapped networks. We plan, implement, harden, back up, document and support the database you choose, and we prepare the access control, logging and evidence that your security and compliance reviewers will ask for. We do not issue audit reports or certifications; independent auditors and certification bodies do that work.
How we scope
- The written scope names each database, its version line, and the environments it will run in.
- Scope covers the access model, SSO integration, backup and restore targets, and audit logging for the chosen database.
- Engagements are fixed-scope, and deliverables and timelines are agreed in writing before work starts.
How we build
- We install and configure the database inside your cloud account, data center or air-gapped network.
- We integrate it with your identity provider, monitoring and existing data tools, and customize it to the agreed scope.
- We harden the setup and test it, covering configuration, permissions, and exposure of data, credentials and admin paths.
How we hand over
- Deliverables include runbooks for backup, restore and upgrades, written for your operations team.
- Documentation covers the architecture, configuration, access roles and audit logs that your compliance reviewers may request.
- Compliance readiness work produces controls and evidence for your assessor, who issues any audit report or certification.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after handover.
- Retainers can cover minor and major version upgrades of the database, planned against the vendor's support window.
- Confirm in the quote which upgrade, testing and response terms the retainer includes before you sign.

