
[[configuration-database-overview]]
A relational database is used to store stream definitions and deployment info.
Spring Cloud Skipper provides schemas for *MariaDB*, *MySQL*, *Oracle*, *PostgreSQL*, *Db2*, *SQL Server*, and *H2*. The schema is automatically created when the server starts.

NOTE: The JDBC drivers for *MariaDB*, *MySQL* (via the _MariaDB_ driver), *PostgreSQL*, *SQL Server* are available without additional configuration. To use any other database you need to put the corresponding JDBC driver jar on the classpath of the server as described <<#add-custom-driver,here>>.

To configure a database the following properties must be set:

* `spring.datasource.url`
* `spring.datasource.username`
* `spring.datasource.password`
* `spring.datasource.driver-class-name`

The `username` and `password` are the same regardless of the database. However, the `url` and `driver-class-name` vary per database as follows.

[frame="none"]
[cols="a,a,a,a"]
[cols="10%,30%,20%,10%"]
|===
|[.small]#Database#|[.small]#spring.datasource.url#|[.small]#spring.datasource.driver-class-name#|[.small]#Driver included#

|[.small]#MariaDB 10.4+#
|[.small]#jdbc:mariadb://${db-hostname}:${db-port}/${db-name}#
|[.small]#org.mariadb.jdbc.Driver#
|[.small]#Yes#

|[.small]#MySQL 5.7#
|[.small]#jdbc:mysql://${db-hostname}:${db-port}/${db-name}?permitMysqlScheme#
|[.small]#org.mariadb.jdbc.Driver#
|[.small]#Yes#

|[.small]#MySQL 8.0+#
|[.small]#jdbc:mariadb://${db-hostname}:${db-port}/${db-name}?allowPublicKeyRetrieval=true&useSSL=false&autoReconnect=true&permitMysqlScheme#{empty}footnote:[SSL is disabled in this example, adjust accordingly for your environment and requirements]
|[.small]#org.mariadb.jdbc.Driver#
|[.small]#Yes#

|[.small]#PostgresSQL#
|[.small]#jdbc:postgres://${db-hostname}:${db-port}/${db-name}#
|[.small]#org.postgresql.Driver#
|[.small]#Yes#

|[.small]#SQL Server#
|[.small]#jdbc:sqlserver://${db-hostname}:${db-port};databasename=${db-name}&encrypt=false#
|[.small]#com.microsoft.sqlserver.jdbc.SQLServerDriver#
|[.small]#Yes#

|[.small]#DB2#
|[.small]#jdbc:db2://${db-hostname}:${db-port}/{db-name}#
|[.small]#com.ibm.db2.jcc.DB2Driver#
|[.small]#No#

|[.small]#Oracle#
|[.small]#jdbc:oracle:thin:@${db-hostname}:${db-port}/{db-name}#
|[.small]#oracle.jdbc.OracleDriver#
|[.small]#No#
|===

==== H2
When no other database is configured and the *H2* driver has been added to the server classpath then
Spring Cloud Skipper uses an embedded instance of the *H2* database as the default.

NOTE: *H2* is good for development purposes but is not recommended for production use nor is it supported as an external mode.

To use *H2* add the `com.h2database:h2:2.1.214` JDBC driver to the classpath and do not configure any other database.
