Azure offers managed relational engines for SQL Server-compatible, PostgreSQL, and MySQL workloads. Choose the engine for application compatibility, team skill, extension/features, licensing, migration path, and ecosystem. Then choose a service tier by measured CPU, memory, I/O, storage, connections, availability, backup, and recovery needs.
Lab: 45–60 minutes · Cost: database compute, storage, backups, network, replicas, and logs can charge continuously · Safety: choose the smallest learning tier and delete it promptly.
Do not choose only from benchmark headlines. Run the real query mix with realistic data and concurrency.
Ways to build
Choose the Azure tool you want to use. The underlying resource stays the same.
Search for the chosen database service → Create. Set subscription/group, server and database names, region, workload tier, authentication, networking, backups, redundancy, maintenance, encryption, and tags.
For production:
Use managed identity/Entra token authentication where supported. If a password remains necessary, store it in Key Vault and rotate it. Configure connection pooling below database limits, set command/connect timeouts, retry only transient errors, and use parameterized queries.
Serverless application scaling can create a connection storm. Put a connection budget into the architecture: maximum app replicas × pool size must fit the database with headroom for operations.
Use versioned migrations and the expand/migrate/contract pattern:
Never make a deployment slot swap responsible for reversing a destructive database migration.
Server, database, identity administrator, private endpoint and DNS, security settings, diagnostic settings, alerts, backup/retention, and optional replicas/failover groups. Keep database schema in a migration system, not ARM/Bicep. Protect Terraform state and avoid plaintext credentials.
Managed backups support point-in-time restore within retention. Long-term retention and geo-restore vary by engine/tier. A backup is not validated until a restore drill proves the data, permissions, connection changes, DNS, and application startup path.
Measure:
Delete the isolated resource group and confirm retained backups or long-term retention do not remain under a separate lifecycle. Remove Entra app identities only if the lab created them and they are unused.