What Is an Open Source Database?

Updated June 2026
An open source database is a database management system whose source code is publicly available under a license approved by the Open Source Initiative, granting anyone the right to use, study, modify, and distribute the software without paying licensing fees. PostgreSQL, MySQL, MariaDB, SQLite, Apache Cassandra, and Valkey are examples of genuinely open source databases. Some databases like MongoDB and Redis publish their source code but use licenses that do not meet the OSI definition of open source, a distinction that matters for deployment flexibility and long-term planning.

The Detailed Answer

The term "open source" has a specific, formal meaning defined by the Open Source Initiative (OSI), the organization that has maintained the Open Source Definition since 1998. A database qualifies as open source when its license satisfies all ten criteria in the OSD, including free redistribution, access to source code, permission to create derived works, no discrimination against persons or fields of use, and technology neutrality. This definition ensures that open source software provides genuine freedom to its users, not just access to the code.

Open source databases differ from proprietary databases like Oracle Database, Microsoft SQL Server, and IBM Db2 in several fundamental ways. There are no per-server, per-core, per-socket, or per-user licensing fees. You can deploy the database on as many servers as you need without negotiating license agreements or tracking compliance. You can read the source code to understand how the database works, verify its security, and diagnose bugs at the deepest level. You can modify the code to fix issues, add features, or optimize performance for your specific workload. And you can do all of this without asking anyone for permission.

What licenses do open source databases use?
Open source databases use several different OSI-approved licenses, each with different terms. The PostgreSQL License (similar to BSD/MIT) is the most permissive, allowing unrestricted use including in proprietary products. The Apache 2.0 license is similarly permissive, used by Cassandra, ClickHouse, and CouchDB. The GNU General Public License (GPL) requires that modifications to the database code be released under the GPL, used by MySQL, MariaDB, and Neo4j Community. The GNU Affero General Public License (AGPL) extends the GPL to cover network use, used by some database tools and the ScyllaDB Community Edition. All of these are OSI-approved and qualify as genuine open source.
What is the difference between open source and source-available databases?
Source-available databases publish their source code so you can read it, but their licenses include restrictions that violate the Open Source Definition. The Server Side Public License (SSPL), used by MongoDB, requires anyone offering the software as a service to release the entire service stack under SSPL, a condition so broad that it effectively prevents cloud providers from competing. The Business Source License (BSL), used by CockroachDB and others, restricts commercial use during a time period before converting to a permissive license. The RSALv2 license, used by Redis alongside SSPL, restricts offering the software as a managed service. These licenses are not recognized by the OSI as open source, even though the source code is visible. The practical impact is that you can use these databases for your own applications, but you cannot offer them as a hosted service to others without a commercial agreement.
Does using a GPL database make my application GPL?
No. Connecting to a GPL-licensed database (like MySQL or MariaDB) over a network protocol does not make your application a derivative work under the GPL. Your application remains under whatever license you choose. The GPL applies to the database engine itself. If you modify the database source code and distribute the modified version, those modifications must be released under the GPL. But simply using the database as a server that your application connects to does not trigger any GPL obligations for your application code. This is a common misconception that sometimes steers developers away from excellent GPL-licensed databases unnecessarily.
Why did some databases change their licenses away from open source?
Several database companies changed their licenses to prevent cloud providers (primarily AWS, Google Cloud, and Azure) from offering the database as a managed service without contributing back to the project or paying licensing fees. MongoDB switched from AGPL to SSPL in 2018. Redis switched from BSD to RSALv2/SSPL in 2024. Elasticsearch switched from Apache 2.0 to SSPL in 2021 (later moving to AGPL). These companies argued that cloud providers were capturing the economic value of the database without proportional contribution. In each case, the license change prompted community forks: OpenSearch from Elasticsearch, Valkey from Redis. These forks maintain the original open source license and have attracted significant community and corporate support.

Why Open Source Licensing Matters for Databases

The license on your database affects more than legal compliance. It shapes your long-term flexibility in ways that may not be obvious when you first choose a database for a new project.

Vendor lock-in is the most practical concern. With a genuinely open source database, no single company can change the terms under which you use the software. PostgreSQL's permissive license and community governance mean that even if every company currently contributing to PostgreSQL disappeared, the code would remain freely available and the community could continue development. With a source-available database under SSPL or BSL, the company controlling the license can change terms at any time, as Redis demonstrated in 2024 when it moved from BSD to a restrictive license.

Cloud portability is another factor. Open source databases can be deployed on any cloud provider, on-premises, or in hybrid configurations without licensing complications. Source-available databases may restrict how cloud providers can offer them, which affects the availability and pricing of managed services. Valkey, as a BSD-licensed Redis fork, is now offered as a managed service by multiple cloud providers, giving users more competitive options than were available when Redis was the only choice.

Contribution and customization matter for organizations that need to modify the database. Open source licenses guarantee your right to fork, patch, and redistribute modifications. Source-available licenses may permit modifications for internal use but restrict redistribution, limiting your ability to share improvements with the community or contribute upstream.

The Most Important Open Source Databases

The open source database ecosystem is mature and covers every major workload category. PostgreSQL is the most feature-rich relational database, released under the ultra-permissive PostgreSQL License. MySQL and MariaDB are the most widely deployed relational databases, both under the GPL. SQLite is the most deployed database engine of any kind, released into the public domain. Apache Cassandra provides distributed wide-column storage under Apache 2.0. Valkey provides Redis-compatible in-memory caching under BSD. ClickHouse provides columnar analytics under Apache 2.0. Neo4j Community provides graph database capabilities under the GPL. Apache CouchDB provides document storage under Apache 2.0.

Together, these databases cover relational OLTP, document storage, key-value caching, wide-column distributed writes, graph traversals, columnar analytics, time-series data, and embedded/serverless use cases. There is no workload category where you must use a proprietary or source-available database, which is the strongest argument for the health and maturity of the open source database ecosystem.

How Open Source Databases Are Funded

Open source databases sustain development through several business models. Some are backed by companies that sell managed cloud services (Supabase and Neon for PostgreSQL, Aiven for multiple databases, Instaclustr for Cassandra). Others are supported by companies that sell enterprise features, support contracts, and consulting (MariaDB Corporation, Percona for MySQL/PostgreSQL, Neo4j Inc). PostgreSQL is funded by a broad ecosystem of contributing companies rather than a single commercial entity, which is one reason its governance is considered the most resilient.

Community contributions from individual developers, universities, and organizations that use the database also play a significant role. PostgreSQL's core development includes contributors from dozens of companies and independent developers across multiple continents. This diversity of funding and contribution sources reduces the risk that any single business decision (like a license change or acquisition) could disrupt the project.

Key Takeaway

An open source database is one whose license is approved by the Open Source Initiative, guaranteeing your freedom to use, modify, and distribute it without restriction. PostgreSQL, MySQL, MariaDB, SQLite, Cassandra, Valkey, and ClickHouse all qualify. MongoDB and Redis do not, despite publishing their source code.