EdgeDB is a next-generation database that fixes SQL frustrations. It provides a modern query language (EdgeQL), built-in migrations, and a type-safe schema.
What Is EdgeDB?
EdgeDB is built on top of PostgreSQL but replaces SQL with EdgeQL — a more intuitive, composable query language. It handles relations, constraints, and computed properties natively.
Free tier (EdgeDB Cloud):
- 1 instance
- 1GB storage
- Generous compute
Quick Start
curl --proto "=https" -sSf https://sh.edgedb.com | sh
edgedb project init
Schema (SDL)
type User {
required name: str;
required email: str { constraint exclusive; };
multi posts: Post;
}
type Post {
required title: str;
required body: str;
required author: User;
created_at: datetime { default := datetime_current(); };
}
EdgeQL
# Insert
INSERT User { name := "Alice", email := "alice@example.com" };
# Query with nested data (no JOINs!)
SELECT User {
name, email,
posts: { title, created_at }
}
FILTER .email = "alice@example.com";
# Aggregation
SELECT User {
name,
post_count := count(.posts)
}
ORDER BY .post_count DESC;
HTTP API
curl -X POST http://localhost:5656/branch/main/edgeql \
-H "Content-Type: application/json" \
-d '{"query":"SELECT User { name, email } LIMIT 10"}'
Use Cases
- Modern apps — type-safe schema + queries
- Graph-like data — relations without JOINs
- APIs — built-in HTTP API
- Migrations — automatic schema migrations
- PostgreSQL upgrade — keep PostgreSQL, better DX
Need web data at scale? Check out my scraping tools on Apify or email spinov001@gmail.com for custom solutions.
Top comments (0)