Book Image

Developing Modern Database Applications with PostgreSQL

By : Dr. Quan Ha Le, Marcelo Diaz
Book Image

Developing Modern Database Applications with PostgreSQL

By: Dr. Quan Ha Le, Marcelo Diaz

Overview of this book

PostgreSQL is an open-source object-relational database management system (DBMS) that provides enterprise-level services, including high performance and scalability. This book is a collection of unique projects providing you with a wealth of information relating to administering, monitoring, and testing PostgreSQL. The focus of each project is on both the development and the administrative aspects of PostgreSQL. Starting by exploring development aspects such as database design and its implementation, you’ll then cover PostgreSQL administration by understanding PostgreSQL architecture, PostgreSQL performance, and high-availability clusters. Various PostgreSQL projects are explained through current technologies such as DevOps and cloud platforms using programming languages like Python and Node.js. Later, you’ll get to grips with the well-known database API tool, PostgREST, before learning how to use popular PostgreSQL database testing frameworks. The book is also packed with essential tips and tricks and common patterns for working seamlessly in a production environment. All the chapters will be explained with the help of a real-world case study on a small banking application for managing ATM locations in a city. By the end of this DBMS book, you’ll be proficient in building reliable database solutions as per your organization's needs.
Table of Contents (17 chapters)
1
Section 1 - Introducing PostgreSQL Development and Administration
3
Section 2 - Development in PostgreSQL
9
Section 3 - Administration in PostgreSQL

 Heimdall installation by Docker

Heimdall is available in the cloud from AWS or we can install it on-premises. For practical purposes, here, we will install it locally through Docker by means of the following simple steps:

  1. Download the Docker file using the wget command:
 wget https://s3.amazonaws.com/s3.heimdalldata.com/Dockerfile
  1. Build a Docker image:
docker build -t "heimdall:current" .
  1. Create a container based on that image in order to obtain Heimdall data:
docker run -d --name heimdall-instance -p 8087:8087 -p 3306:3306 -p 5432:5432 -p 1433:1433 heimdall:current

So far, the last step shows something super important: -p 8087:8087. This is the port for the Heimdall administration web. Let's see how to configure this first before checking whether our Heimdall container is running:

#docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e96017aef7b5 heimdall:current "/opt/heimdall/heimd…" 1 min ago Up 1 min ago 0.0.0.0:1433->1433...