
Cloud
Learning Level
Relational databases are fundamental to most applications. Each provider offers fully managed SQL databases with automatic backups, replication, and scaling.
| Aspect | AWS | GCP | Azure |
|---|---|---|---|
| Service | RDS | Cloud SQL | SQL Database |
| Engines | MySQL, PostgreSQL, MariaDB, Oracle, SQL Server | MySQL, PostgreSQL, SQL Server | SQL Server, MySQL, MariaDB |
| Fully Managed | Yes | Yes | Yes |
| Auto Backups | Yes | Yes | Yes |
| Auto Scaling | Read replicas | Storage autoscale | Elastic pools |
| Multi-AZ | Yes | High availability | Geographic replication |
aws rds create-db-instance \
--db-instance-identifier my-database \
--db-instance-class db.t3.micro \
--engine mysql \
--master-username admin \
--master-user-password mypassword \
--allocated-storage 20const mysql = require('mysql2/promise');
const connection = await mysql.createConnection({
host: 'mydb.c9akciq32.us-east-1.rds.amazonaws.com',
user: 'admin',
password: 'mypassword',
database: 'mydatabase'
});
const [rows] = await connection.execute('SELECT * FROM users');
console.log(rows);gcloud sql instances create my-database \
--database-version POSTGRES_13 \
--tier db-f1-micro \
--region us-central1const { Pool } = require('pg');
const pool = new Pool({
host: '35.192.123.45',
user: 'postgres',
password: 'mypassword',
database: 'mydatabase'
});
const result = await pool.query('SELECT * FROM users');
console.log(result.rows);az sql db create \
--resource-group myResourceGroup \
--server myServer \
--name myDatabase \
--service-objective S0const sql = require('mssql');
const config = {
server: 'myserver.database.windows.net',
authentication: {
type: 'default',
options: {
userName: 'sqladmin',
password: 'mypassword'
}
},
options: {
database: 'mydatabase'
}
};
const pool = new sql.ConnectionPool(config);
await pool.connect();
const result = await pool.request().query('SELECT * FROM users');| Feature | AWS RDS | GCP Cloud SQL | Azure SQL |
|---|---|---|---|
| Engines | 5+ | 3 | 3 |
| Min Cost | $12/mo | $20/mo | $5/mo |
| Auto Backup | Yes | Yes | Yes |
| Replication | Read replicas | High availability | Geo-replication |
| Failover | Automatic (Multi-AZ) | Automatic | Automatic |
| Connection Pool | RDS Proxy | Cloud SQL Proxy | Elastic pools |
AWS: Multi-AZ (synchronous replication, automatic failover)
GCP: High availability (one standby replica)
Azure: Zone redundancy (across availability zones)
AWS: Automated daily + on-demand snapshots
GCP: Automated backups (automatic retention)
Azure: Automated backups (configurable retention)
AWS: Read replicas + manual vertical scaling
GCP: Automatic storage scaling + manual compute scaling
Azure: Elastic pools for multi-tenant + vertical scaling
Write to Primary → Read Replicas
AWS: Read replicas in any region
GCP: Regional read replicas
Azure: Read-only replicasPrimary DB (Primary Region)
↓
Standby DB (Automatic Failover)
↓
Backup Storage (Multi-region)1. Use smaller instances: Most apps don't need large DBs
2. Enable automatic scaling: Store only what you need
3. Configure appropriate backups: Don't over-backup
4. Use read replicas smartly: Only when needed
5. Right-size instances: Monitor and adjust
AWS RDS: Best if already on AWS
GCP Cloud SQL: Best if using Google Cloud
Azure SQL: Best if using Microsoft stack
Can migrate between providers using:
Resources
Ojasa Mirai
Master AI-powered development skills through structured learning, real projects, and verified credentials. Whether you're upskilling your team or launching your career, we deliver the skills companies actually need.
Learn Deep • Build Real • Verify Skills • Launch Forward