liveBook · Manning

Azure Database for PostgreSQL

As explained in Microsoft Azure in Action

Azure Database for PostgreSQL is a managed Azure relational database service based on the PostgreSQL database engine.

Azure Database for PostgreSQL is a managed Azure relational database service built on PostgreSQL. Its robustness, advanced features, and strong standards compliance suit complex, high-scale applications. section 10.3.3

For an ordering system such as Banning Books, it balances performance, cost, recovery, and security. Automatic performance tuning can help during peak shopping periods, while PAYG pricing and selectable compute and storage resources support cost control. section 10.3.3

Evaluate the service with these practical trade-offs:

  • Performance: PostgreSQL handles complex, high-scale applications, but complex queries may be slower and optimal performance can require manual tuning. section 10.3.3
  • Cost: PAYG pricing and resource selection help control spending, although higher tiers, storage, backups, and network traffic can increase the bill. section 10.3.3
  • Disaster recovery: Automated backups and point-in-time recovery are available, but active geo-replication is not. section 10.3.3
  • Security: Firewall rules, SSL connections, and advanced threat protection support privacy and compliance, but careful configuration remains essential. section 10.3.3

Create a PostgreSQL server and database

Azure CLI requires two steps: create the server, then create the database. Example:\n\naz postgres server create --name BanningBooksPostgreSQLServer --resource-group BanningRG --location australiaeast --admin-user adminuser --admin-password <your_password> --sku-name B_Gen5_2 --version 11\n\naz postgres db create --resource-group BanningRG --server-name BanningBooksPostgreSQLServer --name BanningBooksDatabase

Table 10.5 Pros and cons of using Azure Database for PostgreSQL for the Banning Books requirements

Requirement

Pros

Cons

Performance

PostgreSQL is known for its robustness and advanced features, making it suitable for complex, high-scale applications. Azure Database for PostgreSQL also offers automatic performance tuning.

While PostgreSQL is generally performant, it may require manual tuning for optimal performance. In addition, complex queries can be slower in PostgreSQL compared to some other database systems.

Costs

PAYG model allows for cost control. The cost can be optimized by choosing the right combination of compute and storage resources.

Costs can increase with higher performance tiers. In addition, while the base cost may be lower, additional costs may be incurred for storage, backup storage, and network traffic.

Disaster recovery

Supports automated backups and point-in-time recovery, which aligns with the need for a robust disaster recovery plan. In addition, Azure Database for PostgreSQL supports geo-­redundant backups.

While it supports geo-redundant backups, active geo-replication isn’t supported, which could be a limitation for a robust disaster recovery strategy.

Security

Supports firewall rules and SSL connections to ensure data privacy and compliance with regulations. In addition, Azure Database for PostgreSQL provides advanced threat protection.

Requires proper configuration to ensure security. While it provides advanced threat protection, it may not have all the security features provided by Azure SQL DB.

Browse the requirement-by-requirement pros and cons for performance, costs, disaster recovery, and security. section 10.3.3

How Microsoft Azure in Action covers it

How deep it goes
Explains four operational trade-offs and demonstrates server and database creation through Azure CLI.
Examples
Uses the Banning Books ordering system and Azure CLI commands that create a PostgreSQL server followed by its database.
What it assumes
Assumes familiarity with relational database choices and Azure CLI syntax; demonstrates the server and database setup sequence.
What you can do after
Operate/configure it by creating an Azure PostgreSQL server and database, then evaluate its performance, cost, recovery, and security trade-offs.
How it connects
Connects PostgreSQL with relational databases, automatic backups, point-in-time recovery, firewall rules, SSL, and advanced threat protection.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microsoft Azure in Action. The section links point to the parts of the book it draws on.