Working with PostgreSQL in Java

# Working with PostgreSQL in Java

### Introduction

PostgreSQL (which goes by the moniker Postgres) is famous for its object-relational nature. In contrast, other database systems are usually relational. Due to its nature, it's a great pairing with Java, which is heavily object-oriented.

Accessing a Postgres database using Java requires you to rely on the JDBC API, as you might've suspected. Because of this, Postgres routines and those of other database systems are alike. Still, that does not hide the fact that Postgres offers extra capabilities - such as an extended support for custom data types and large data sets.

### What is PostgreSQL?

PostgreSQL is a derivative of the now defunct POSTGRES project. POSTGRES aimed to achieve not only object-orientation, but also extensibility. Nonetheless, the University of California ceased POSTGRES' development in 1994.

The early Postgres releases targeted UNIX computers. Yet, over the years, the database has become portable. Thus, you can find it on MacOS, Linux, and Windows systems.

Its open-source and free licensing has also added to its widespread adoption. Developers love it, in part, because they can dig into sources to find out how it works exactly.

### Demo Application

A Postgres guide is incomplete without an accompanying CRUD implementation. We'll be writing a simple Java application that can create, read, update, and delete customer information from a Postgres database.

Of course, we'll start off by defining the entities and then using them to generate the database schema to make sure the tables are mapped correctly.

And as proper API demands, the business logic layer should not have an idea of what goes on in the database layer - a practice known as layered architecture. We will thus opt for the Data Access Object (DAO) pattern to meet this need.

#### Maven Dependency

We'll start off with a maven-archetype-quickstart for a simple skeleton Maven project via your terminal:

## Make Clarity from Data - Quickly Learn Data Visualization with Python

Learn the landscape of Data Visualization tools in Python - work with Seaborn, Plotly, and Bokeh, and excel in Matplotlib!

From simple plot types to ridge plots, surface plots and spectrograms - understand your data and learn to draw conclusions from it.