Mastering Azure Database for PostgreSQL

Introduction

In this article, I will explain the Azure Database for PostgreSQL service and how to create and deploy the service in the Microsoft Azure Platform.

Azure Database for PostgreSQL Service

Azure Database for PostgreSQL is an open-source relational database service. It is a fully managed relational database service provided by the Microsoft Azure Cloud Platform.

This service is based on the PostgreSQL database service provided by the open-source framework. It is available in the Platform as a Service model.

Steps to create Azure Database for PostgreSQL service

In the search bar, type Azure Database for PostgreSQL service.

Services

Click Create option.

Azure Database for PostgreSQL Servers

Choose Azure database for the PostgreSQL option.

Choose deployment option

First, provide an Azure subscription and create a new Resource group as testRG.

Type the Server name as retailserver1505 and choose Region as US East US.

Choose the PostgreSQL server version as 14

Select workload type as Development.

Flexible Server

Choose the Authentication type as PostgreSQL authentication only.

Type admin username as retailadmin.

Provide the password and confirm password options.

Authentication

In the Networking tab, choose the connectivity method as Public access.

In the firewall rules, add the current client IP address and check the checkbox to allow public access from any service within Azure to this server.

Networking

Click the Review + Create button.

Deployment started initialized in a minute or two this became successful.

Deployment

Click the goto resource button.

Click connect button.

retailserver

Select the database to connect Postgre and then click the ok button.

Connect

It will ask you to create storage, which is mentioned below.

Create Storage

After that, you will get the message as Cloud Shell Succeeded, and please provide password details.

Deployment

To list the databases in PostgreSQL, type \l and \c to use the database.

Deployment

Create a database named banking, \d, which describes the table schema.

Deployment

Create a table employee, insert some records into the table, and retrieve the data accordingly.

Deployment

Summary

In this article, we learned and created the Azure Database for PostgreSQL service. And also we created the database, insert some data, and retrieved the results.

I hope you have enjoyed reading this article!!!