# Supported databases for the new Keycloak store

DevFeed: [Supported databases for the new Keycloak store](<https://devfeed.tech/articles/supported-databases-for-the-new-keycloak-store-31593.md>)

Original publisher: [Read original article](<https://www.keycloak.org/2022/02/dbs>)

Author: Stian Thorgersen

Published: 2022-02-24T00:00:00Z

Content type: article

Language: en

Sources: [Keycloak Blog](<https://devfeed.tech/sources/keycloak-blog.md>)

Topics: [Keycloak](<https://devfeed.tech/topics/keycloak.md>), [CockroachDB](<https://devfeed.tech/topics/cockroachdb.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Databases](<https://devfeed.tech/topics/databases.md>)

Tags: [cockroachdb](<https://devfeed.tech/tags/cockroachdb.md>), [databases](<https://devfeed.tech/tags/databases.md>), [idm](<https://devfeed.tech/tags/idm.md>), [kerberos](<https://devfeed.tech/tags/kerberos.md>), [keycloak](<https://devfeed.tech/tags/keycloak.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [ldap](<https://devfeed.tech/tags/ldap.md>), [mariadb](<https://devfeed.tech/tags/mariadb.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [nosql](<https://devfeed.tech/tags/nosql.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [openid-connect](<https://devfeed.tech/tags/openid-connect.md>), [oracle](<https://devfeed.tech/tags/oracle.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [saml](<https://devfeed.tech/tags/saml.md>), [sql-server](<https://devfeed.tech/tags/sql-server.md>), [sso](<https://devfeed.tech/tags/sso.md>)

## AI overview

Keycloak outlines a plan to classify database support into first-class, second-class, and community levels. PostgreSQL and CockroachDB are identified as first-class candidates, while MySQL, MariaDB, SQL Server, and Oracle may be phased out over time.

## Source excerpt

Maintaining a broad selection of relational database support is expensive, and also more importantly limits how well the databases can be supported. With that in mind we are looking at supporting databases at different levels; first class, second class, and community. Please fill in this survey as we'd like to gather as much feedback as we can. First class databases The aim of first class databases is to offer better levels of tuning and testing, better defaults, and better documentation. We will also be considering testing with different versions and variants of the selected first class databases, such as cloud services. First class databases will be the solutions we are looking towards when scaling and tuning database to accommodate large scale deployments with high-availability, including multi-region deployments. As first class databases we aim to support one traditional relational database, and a cloud native database. With this in mind we have selected PostgreSQL and CockroachDB as the best candidates. PostgreSQL is a high quality fully open source database, with many supported offerings such as: Azure Database for PostgreSQL Amazon RDS for PostgreSQL BigAnimal Cloud SQL for PostgreSQL Cruncy Bridge Cruncy PostgreSQL for Kubernetes EnterpriseDB CockroachDB is an cloud native open source database, with PostgreSQL compatibility. By cloud native it means that it can scale horizontally, including spanning multiple-regions. There are some competitive solutions, but not as mature, and with less streamlined PostgreSQL compatibility. There are obviously also NoSQL and other non-relational database that could in theory be a good fit for Keycloak, but would be a lot of additional effort to support. It is also worth mentioning that we are still looking towards Infinispan as our cache layer, but are also aiming to support running Keycloak without Infinspan for smaller deployments with PostgreSQL and larger deployments with CockroachDB. Second class databases The aim for s