Built on PostgresOpen sourceNext-level developer experience

The developer database

Built on PostgresOpen source

EdgeDB is a next-generation database that gives developers superpowers. It takes the tools and features you know and love — declarative schema, interactive migrations, deep querying, introspectability, and more — and bakes them directly into the database.

Install Now

The easiest and preferred way to install and set up the EdgeDB server is using our command-line tool. Run the following in your terminal and follow the on-screen instructions.

Linux and macOS
curl --proto '=https' --tlsv1.2 -sSf https://sh.edgedb.com | sh
What does this script do?

Key Features

  • Powerful, readable query language
  • Declarative schema
  • First-party migration system
  • JOIN-less deep fetching
  • Schema introspection
  • User-friendly CLI written in Rust
  • Built on top of Postgres
  • Strict, consistent type system
  • GraphQL out of the box
  • Polymorphic queries
  • Dedicated libraries for TypeScript, Python, and Go

Elegant data modeling

Your schema is too important to be scattered across your database, migration scripts, and ORM models. With EdgeDB, your datamodel is defined in one place, using EdgeDB’s readable declarative schema language. Just write out your object types (analagous to tables in SQL), their properties, and the links between them—no foreign keys required.

DiscoverWhy EdgeDB schema is so convenient?
type Person {
  required property name -> str;
  multi link friends -> Person;

type Animal {
  property num_legs -> int32;
  link owner -> Person;

Superpowered querying

EdgeDB makes hard queries easy. It was designed in conjunction with an accompanying query language, EdgeQL, featuring a readable, composable syntax that supports deep queries, nested mutations, and more while remaining more compact, composable, and readable than SQL.

DiscoverThe best features of EdgeQL
# no JOINs, no foreign keys
SELECT Person {
  pets: {
FILTER .name = "Tony";

Painless migrations

Never write another schema migration script again. Just update your schema file and run edgedb create-migration to interactively generate a migration. Then run edgedb migrate to push the latest changes to your database. It’s that simple.

DiscoverEasy schema evolution with EdgeDB migrations
type BaseUser {
type User {
  required property name -> str;
  required property email -> str;
  multi link friends -> User;
All-in-oneCross Platform

Idiomatic tooling

EdgeDB includes the all-encompassing edgedb command-line tool. It provides an idiomatic way to do just about everything: install EdgeDB, spin up a local instance, open a REPL, execute queries, manage auth roles, introspect a database schema, create migrations, and more. Install it with one shell command.

Linux and macOS
curl --proto '=https' --tlsv1.2 -sSf https://sh.edgedb.com | sh
What does this script do?
Easy to UseIdiomatic

Official libraries
for your favorite languages

Unlike most relational databases, EdgeDB maintains first-party clients for popular languages like JavaScript/TypeScript, Python, and Go. All clients implement EdgeDB’s binary protocol for low latency, blazing fast queries.

  • TypeScript and JavaScript

    npm install edgedb
  • Python

    pip install edgedb
  • Golang

    go get github.com/edgedb/edgedb-go
  • Deno

    import * as edgedb from "https://deno.land/x/edgedb/mod.ts";
Integrates with GraphQL Ecosystem

GraphQL out of the box

If you’re a GraphQL fan we’ve got you covered. EdgeDB databases can expose an auto-generated GraphQL endpoint, so you can query all types, filter and sort by any property, easily fetch deeply related fields, introspect your schema with GraphiQL, and integrate with your favorite GraphQL tooling.

DiscoverQuery and mutate data with GraphQL
query getMovie($id: String!){
  Movie(filter: {id: {eq: $id}}) {
    actors(order: {name: DESC}) {
Efficient QueriesOptimized Storage

Great performance

Normally convenience comes at the price of performance, but not this time. Under the hood, EdgeDB maintains an optimal table layout, intelligently caches incoming queries, and compiles EdgeQL into efficient Postgres queries that go head-to-head with the best handwritten SQL. Plus, the composable nature of EdgeQL can eliminate unnecessary requests with easy nested queries and mutations.

DiscoverCompare EdgeDB to SQL and ORMs
Performance chart comparing EdgeDB to ORMs and handwritten SQL.
Aggregate performance metrics, combined from our benchmarks published in Alpha 1 and Alpha 2 announcement blog posts.


Is EdgeDB a brand new database?

Yes — EdgeDB is a new database with its own query language, type system, and set of tools and conventions.

That said, EdgeDB is built on top of Postgres. This lets us design a better abstraction for databases while taking advantage of the incredible work done by the Postgres community over the past 35 (!) years. Internally, all EdgeQL queries are compiled into an equivalent Postgres query. You can run EdgeDB as a query engine on top of an externally hosted Postgres instance or let EdgeDB manage Postgres for you under the hood.

Is EdgeDB an ORM?

No. Like every database throughout history, EdgeDB introduces a layer of abstraction on top of more primitive mechanisms performing data access and manipulation. In the case of most databases, these mechanisms are often low-level key-value stores (for example, WiredTiger in MongoDB, InnoDB in MySQL, or RocksDB in CockroachDB). EdgeDB takes this concept one level further: it treats PostgreSQL as a lower-level storage engine and introduces better schema and query abstractions on top.

In contrast, ORMs are libraries that provide a high-level way to query and manipulate data in your database. Typically an ORM 1) provides a standard interface for querying a number of supported databases, 2) is strongly coupled to a particular programming language (like JavaScript or Python), 3) is less capable than the query language is abstracts away (usually SQL), and 4) provides an object-oriented way to perform and persist data manipulations.

EdgeDB has none of these properties. You query and manipulate data with a full-featured query language (EdgeQL) that is designed to match or surpass the power of SQL (though certain advanced features are still under development, see the Roadmap for details). It’s language agnostic: you can interact with your database with any programming language you like. And it was designed from the start as a new abstraction on top of Postgres specifically.

That last part is important. It lets EdgeDB take full advantage of the power of Postgres, whereas ORMs cannot; their capabilities are limited to features shared by all the databases they support.

So what are the new features?

There are a lot! Scroll down to the "Showcase" below for a bunch of examples. As a rough structure, we consider the main innovations to be three-fold:

The EdgeQL query language: a full redesign of SQL that has been sorely needed for decades. This includes support for GraphQL-style selection sets, easily nestable subqueries (including inserts and updates), a new link concept that abstracts away JOINs and foreign keys, edge properties, and a typesafe NULL-free type system grounded in set theory.

Declarative schema. The EdgeDB spec includes a schema definition language (simply called the EdgeDB SDL) that lets you define your schema declaratively and succinctly, including advanced features like abstract types, computable fields, unions, custom scalars, and JSON support.

First-party migrations. Migrations have been a pain point for developers since the introduction of SQL. Hundreds of libraries across dozens of language ecosystems have tried to solve the problem of SQL migrations. EdgeDB ships with a first-party interactive migration tool baked directly into the `edgedb` command-line tool.

But there are a hundred cool and nifty ways we’ve upgraded the developer experience of creating, querying, and managing databases. Jump into the docs to understand EdgeDB in all its glory.

How does it compare to other databases?

EdgeDB is a relational database at its core. Literally: it’s built on top of PostgreSQL. But it takes inspiration of ideas pioneered by NoSQL, graph databases, GraphQL, and ORM libraries.