Cloud Databases Overview (RDS, Supabase, PlanetScale)
Modern applications don't run databases on local servers — they use managed cloud database services. AWS RDS, Supabase, PlanetScale, Neon, and CockroachDB provide fully-managed SQL databases with automatic backups, scaling, and high availability.
Major Cloud SQL Platforms
- AWS RDS — managed MySQL/PostgreSQL/MariaDB/SQL Server/Oracle on AWS
- AWS Aurora — cloud-native MySQL/PostgreSQL compatible, 3-5× faster, auto-scaling
- Supabase — open-source Firebase alternative, PostgreSQL + REST + Auth + Realtime
- PlanetScale — distributed MySQL (Vitess), zero-downtime schema changes, branching
- Neon — serverless PostgreSQL, branching, auto-suspend, scales to zero
- CockroachDB — distributed PostgreSQL-compatible, global multi-region, strong consistency
- Turso (libSQL) — edge-deployable SQLite, ultra-low latency
Cloud Database Comparison & Usage
-- AWS RDS PostgreSQL: full control, standard PostgreSQL
-- Connection string:
-- postgresql://user:password@rds-endpoint.rds.amazonaws.com:5432/ecommerce_db
-- Supabase: open-source, includes REST API auto-generated from schema
-- JavaScript client:
-- const { data } = await supabase.from('orders').select('*, users(name)').eq('status', 'pending');
-- Row Level Security (RLS):
ALTER TABLE orders ENABLE ROW LEVEL SECURITY;
CREATE POLICY "Users see own orders" ON orders
FOR SELECT USING (user_id = auth.uid());
-- PlanetScale: MySQL with schema branching
-- pscale branch create ecommerce dev -- create dev branch
-- pscale deploy-request create ecommerce dev main -- deploy schema change
-- Zero-downtime schema diff:
-- pscale deploy-request diff ecommerce pr-1
-- Neon: serverless PostgreSQL (scales to zero)
-- Connection: postgresql://user:pass@ep-long-id.us-east-1.aws.neon.tech/ecommerce
-- Instant branching for preview environments:
-- neon branch create --name feature/new-schema
-- neon connection-string feature/new-schema
-- Key differences:
-- RDS: max flexibility, manual scaling, enterprise
-- Supabase: startup-friendly, built-in auth + API + storage
-- PlanetScale: schema branching, planet-scale distributed MySQL
-- Neon: cheapest for hobby projects, serverless scale-to-zeroQuick Quiz
Tip
Tip
Practice Cloud Databases Overview RDS Supabase PlanetScale in small, isolated examples before integrating into larger projects. Breaking concepts into small experiments builds genuine understanding faster than reading alone.
Technical diagram.
Common Mistake
Warning
A common mistake with Cloud Databases Overview RDS Supabase PlanetScale is skipping edge case testing — empty inputs, null values, and unexpected data types. Always validate boundary conditions to write robust, production-ready sql code.
Practice Task
Note
Practice Task — (1) Write a working example of Cloud Databases Overview RDS Supabase PlanetScale from scratch without looking at notes. (2) Modify it to handle an edge case (empty input, null value, or error state). (3) Share your solution in the Priygop community for feedback.
Key Takeaways
- Modern applications don't run databases on local servers — they use managed cloud database services.
- AWS RDS — managed MySQL/PostgreSQL/MariaDB/SQL Server/Oracle on AWS
- AWS Aurora — cloud-native MySQL/PostgreSQL compatible, 3-5× faster, auto-scaling
- Supabase — open-source Firebase alternative, PostgreSQL + REST + Auth + Realtime