I'm trying to get start with spring-boot integration with databases.
I have read official 29.1 Configure a DataSource topic and it is pretty clear for me.
I want to publish my application with Heroku so I've take a look on official sample project configuration.
Part of pom.xml:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
//...
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
</dependency>
//...
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.4-1203-jdbc42</version>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>3.4.1</version>
</dependency>
I'm wondering now, what is a purpose of using in-memory database like hsqldb with normal production-like database (postgres here)? What is a case when it can be usefull?
What is more, how this will work?
EDIT
Ofc, I have missed something in case of sample project I have mentioned. Comment in application.properties explain why hsql is used:
# Database Config
# Un-comment these lines to connect to a database. When commented out, you automatically get an in-memory-database.
#spring.jpa.hibernate.ddl-auto=update