This article is the second in the series of articles about the creation of Spring RESTful application. The previous article about Hibernate set up you can find here: Spring RESTful part 1: Hibernate

After we have created a structure for our data model with Hibernate we can match our java code with the database tables. But before we will start creating our tables we need to install the database.

There are a lot of databases with their pros and cons, free and paid. For this tutorial, a PostgreSQL was selected as database implementation. If you are familiar with some other database you can replace PostgreSQL with it.

What is PostgreSQL?

Here is what the PostgreSQL team say about their database:

PostgreSQL is a powerful, open source object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.

It is free and open-source software. Its source code is available under PostgreSQL license, a liberal open source license. You are free to use, modify, and distribute PostgreSQL in any form.

PostgreSQL requires minimum maintenance because of its stability. It allows you to define your own data types, index types, and let you develop a custom plugin to meet your requirements.

PostgreSQL has many advanced features that other enterprise database management systems offer, such as:

  • User-defined types
  • Table inheritance
  • Sophisticated locking mechanism
  • Foreign key referential integrity
  • Views, rules, subquery
  • Nested transactions (savepoints)
  • Multi-version concurrency control (MVCC)
  • Asynchronous replication

Many companies have built products and solutions using PostgreSQL. Some featured companies are Apple, Fujitsu, Red Hat, Cisco, Juniper Network, etc. Check out the PostgreSQL’s featured users section for the complete list of organizations who are using PostgreSQL.

We can install PostgreSQL as a regular application on any operating system but a much easier is to install it as a Docker Container.

#liquibase #java #rest-api #docker #spring

Spring RESTful: Docker, PostgreSQL, Liquibase
6.05 GEEK