liveBook · Manning

Azure SQL Database

As explained in Microsoft Azure in Action

Azure SQL is Microsoft's family of managed relational database services based on Microsoft SQL Server technology.

Azure SQL Database is a fully managed relational database service built on the SQL Server engine. It stores application data without requiring you to maintain database hardware. For a web shop, that means orders and inventory can live in Azure SQL Database while the website runs separately in Azure App Service. section 10.3.1 section 1.2.1

SQL Server’s T-SQL support lets you write complex queries and operations for tasks such as managing inventory and processing orders. Built-in performance tuning, automated indexing, and scaling help with changing demand. Managed does not mean decision-free, though: the database still needs a suitable performance tier, access controls, and a budget. section 10.3.1

Weigh these choices before deploying:

  • Cost: Pay As You Go pricing offers flexibility, reserved capacity can help with long-term use, and serverless compute can pause during inactivity. Larger databases, higher performance tiers, and features such as geo-replication can cost more. section 10.3.1
  • Availability: Geo-replication copies a database to a secondary server in another region; failover groups coordinate failover across multiple databases. A redundant application also needs healthy frontends and traffic routing—not just a second database. section 10.7 section 1.2.3
  • Security: Advanced threat protection can alert on unusual database activity. Deployment also requires an authentication choice: the SQL server creation example uses an administrator username and password, while Entra ID-only authentication is an alternative. section 10.3.1

Create a database for an ordering system

Use Azure CLI in two steps: create a logical SQL server with `az sql server create`, supplying a name, resource group, location, and administrator credentials; then create the database on that server with `az sql db create`. The example names its database `BanningBooksDB` and selects the `Basic` service objective. Keep credentials out of casual reuse—the username-and-password route is a convenience, not a reason to ignore authentication design. section 10.3.1

C:/> az sql db create --resource-group BanningRG 
--server BanningBooksServer --name BanningBooksDB 
--service-objective Basic

The database creation command identifies its resource group and existing logical SQL server, then sets the database name and service objective. section 10.3.1

Azure Database for MySQL and Azure Database for PostgreSQL are other managed relational options. Azure SQL Database offers performance and security features for a demanding ordering system, but its price—particularly at higher tiers—belongs in the comparison alongside disaster recovery and workload needs. section 10.3 section 10.3.4

How Microsoft Azure in Action covers it

How deep it goes
Explains managed-service features and trade-offs, then demonstrates two Azure CLI creation commands without detailing database engine internals.
Examples
Uses a web shop and an ordering system, plus Azure CLI commands that create a logical SQL server and database.
What it assumes
Assumes some familiarity with SQL, resource groups, and locations while introducing the managed service and its two-step Azure CLI deployment.
What you can do after
Operate/configure it with Azure CLI and evaluate its performance, security, availability, and cost against other managed relational services.
How it connects
Links SQL Server and T-SQL to Azure App Service, automated indexing, geo-replication, and failover groups.

Also explained in

Compare how 2 books explain Azure SQL Database →

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.