edgedb/README.md

213 lines
6.5 KiB
Markdown
Raw Permalink Normal View History

2018-05-09 17:07:01 +00:00
<p align="center">
2022-02-07 00:33:16 +00:00
<a href="https://www.edgedb.com">
2022-04-15 05:34:50 +00:00
<img src="https://www.edgedb.com/github_banner.png">
2022-02-07 00:33:16 +00:00
</a>
2018-05-09 17:07:01 +00:00
</p>
2022-02-07 00:33:16 +00:00
<div align="center">
<h1>EdgeDB</h1>
<a href="https://github.com/edgedb/edgedb" rel="nofollow">
<img src="https://img.shields.io/github/stars/edgedb/edgedb" alt="Stars">
</a>
<a href="https://github.com/edgedb/edgedb/actions">
<img src="https://github.com/edgedb/edgedb/workflows/Tests/badge.svg?event=push&branch=master" />
</a>
<a href="https://github.com/edgedb/edgedb/blob/master/LICENSE">
2022-05-02 16:37:48 +00:00
<img alt="license" src="https://img.shields.io/badge/license-Apache%202.0-blue" />
</a>
<a href="https://discord.gg/umUueND6ag">
<img alt="discord" src="https://img.shields.io/discord/841451783728529451?color=5865F2&label=discord&logo=discord&logoColor=8a9095">
2022-02-07 00:33:16 +00:00
</a>
<br />
<br />
<a href="https://www.edgedb.com/docs/guides/quickstart">Quickstart</a>
<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
<a href="https://www.edgedb.com">Website</a>
<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
<a href="https://www.edgedb.com/docs">Docs</a>
<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
<a href="https://www.edgedb.com/tutorial">Playground</a>
<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
<a href="https://www.edgedb.com/blog">Blog</a>
<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
<a href="https://discord.gg/umUueND6ag">Discord</a>
<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
<a href="https://twitter.com/edgedatabase">Twitter</a>
<br />
</div>
<br />
<br />
<br/>
<div align="center">
<h2>What is EdgeDB?</h2>
<p style="max-width: 450px;">
EdgeDB is a new kind of database
2022-02-07 00:33:16 +00:00
<br/>
that takes the best parts of
2022-02-07 00:33:16 +00:00
<br/>
relational databases, graph
2022-02-07 00:33:16 +00:00
<br/>
databases, and ORMs. We call it
<br/>a <b>graph-relational database</b>.
</p>
2022-02-07 00:33:16 +00:00
</div>
<br/>
<br/>
<div align="center">
<h3>🧩 Types, not tables 🧩</h3>
</div>
<br/>
Schema is the foundation of your application. It should be something you can
read, write, and understand.
Forget foreign keys; tabular data modeling is a relic of an older age, and it
[isn't compatible](https://en.wikipedia.org/wiki/Object%E2%80%93relational_impedance_mismatch)
with modern languages. Instead, EdgeDB thinks about schema the same way you do:
as **object types** containing **properties** connected by **links**.
2018-05-09 17:07:01 +00:00
```elm
2022-02-07 00:33:16 +00:00
type Person {
2023-11-01 21:41:35 +00:00
required name: str;
2022-02-07 00:33:16 +00:00
}
2018-05-09 17:07:01 +00:00
2022-02-07 00:33:16 +00:00
type Movie {
2023-11-01 21:41:35 +00:00
required title: str;
multi actors: Person;
2022-02-07 00:33:16 +00:00
}
```
2018-05-09 17:07:01 +00:00
2022-02-07 00:33:16 +00:00
This example is intentionally simple, but EdgeDB supports everything you'd
expect from your database: a strict type system, indexes, constraints, computed
properties, stored procedures...the list goes on. Plus it gives you some shiny
new features too: link properties, schema mixins, and best-in-class JSON
support. Read the [schema docs](https://www.edgedb.com/docs/datamodel/index)
for details.
2019-04-10 17:06:56 +00:00
2022-02-07 00:33:16 +00:00
<!-- ### Objects, not rows. ❄️ -->
2019-04-10 17:06:56 +00:00
2022-02-07 00:33:16 +00:00
<br/>
<div align="center">
<h3>🌳 Objects, not rows 🌳</h3>
</div>
<br/>
2019-04-10 17:06:56 +00:00
2022-02-07 00:33:16 +00:00
EdgeDB's super-powered query language EdgeQL is designed as a ground-up
redesign of SQL. EdgeQL queries produce rich, structured objects, not flat
lists of rows. Deeply fetching related objects is painless...bye, bye, JOINs.
2019-04-10 17:06:56 +00:00
```elm
2022-02-07 00:33:16 +00:00
select Movie {
title,
actors: {
name
}
2019-04-10 17:06:56 +00:00
}
2022-02-07 00:33:16 +00:00
filter .title = "The Matrix"
```
2019-04-10 17:06:56 +00:00
2022-02-07 00:33:16 +00:00
EdgeQL queries are also _composable_; you can use one EdgeQL query as an
2022-02-07 23:24:23 +00:00
expression inside another. This property makes things like _subqueries_ and
2022-02-07 00:33:16 +00:00
_nested mutations_ a breeze.
2019-04-10 17:06:56 +00:00
```elm
2022-02-07 00:33:16 +00:00
insert Movie {
title := "The Matrix Resurrections",
actors := (
select Person
filter .name in {
'Keanu Reeves',
'Carrie-Anne Moss',
'Laurence Fishburne'
2019-04-10 17:06:56 +00:00
}
2022-02-07 00:33:16 +00:00
)
2019-04-10 17:06:56 +00:00
}
```
2022-02-07 00:33:16 +00:00
There's a lot more to EdgeQL: a comprehensive standard library, computed
properties, polymorphic queries, `with` blocks, transactions, and much more.
Read the [EdgeQL docs](https://www.edgedb.com/docs/edgeql/index) for the full
picture.
<br/>
<div align="center">
<h3>🦋 More than a mapper 🦋</h3>
</div>
<br/>
While EdgeDB solves the same problems as ORM libraries, it's so much more. It's
a full-fledged database with a
[powerful and elegant query language](https://www.edgedb.com/docs/edgeql/index), a
2022-02-07 00:33:16 +00:00
[migrations system](https://www.edgedb.com/docs/guides/migrations/index), a
[suite of client libraries](https://www.edgedb.com/docs/clients/index) in
different languages, a
[command line tool](https://www.edgedb.com/docs/cli/index), and—coming soon—a
cloud hosting platform. The goal is to rethink every aspect of how developers
model, migrate, manage, and query their database.
Here's a taste-test of EdgeDB's next-level developer experience: you can
install our CLI, spin up an instance, and open an interactive EdgeQL shell with
just three commands.
2019-04-10 17:06:56 +00:00
2022-02-07 00:33:16 +00:00
```
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.edgedb.com | sh
$ edgedb project init
$ edgedb
edgedb> select "Hello world!"
```
2018-05-09 17:07:01 +00:00
2022-02-07 00:33:16 +00:00
Windows users: use this Powershell command to install the CLI.
2018-05-09 17:07:01 +00:00
2019-04-10 17:06:56 +00:00
```
2022-02-07 00:33:16 +00:00
PS> iwr https://ps1.edgedb.com -useb | iex
2019-04-10 17:06:56 +00:00
```
2018-05-09 17:07:01 +00:00
2022-02-07 00:33:16 +00:00
<br />
## Get started
2018-05-09 17:07:01 +00:00
2022-02-07 00:33:16 +00:00
To start learning about EdgeDB, check out the following resources:
2018-05-09 17:07:01 +00:00
2022-02-07 00:33:16 +00:00
- **[The quickstart](https://www.edgedb.com/docs/guides/quickstart)**. If
you're just starting out, the 10-minute quickstart guide is the fastest way
to get up and running.
2023-11-01 21:41:35 +00:00
- **[EdgeDB Cloud 🌤️](https://www.edgedb.com/cloud)**. The best
most effortless way to host your EdgeDB database in the cloud.
2022-02-07 00:33:16 +00:00
- **[The interactive tutorial](https://www.edgedb.com/tutorial)**. For a
structured deep-dive into the EdgeQL query language, try the web-based
tutorial— no need to install anything.
- **[The e-book](https://www.edgedb.com/easy-edgedb)**. For the most
comprehensive walkthrough of EdgeDB concepts, check out our illustrated
e-book [Easy EdgeDB](https://www.edgedb.com/easy-edgedb). It's designed to
walk a total beginner through EdgeDB in its entirety, from the basics through
advanced concepts.
- **The docs.** Jump straight into the docs for
[schema modeling](https://www.edgedb.com/docs/datamodel/index) or
[EdgeQL](https://www.edgedb.com/docs/edgeql/index)!
2018-05-09 17:07:01 +00:00
2022-02-07 00:33:16 +00:00
<br />
2018-05-09 17:07:01 +00:00
2022-02-07 00:33:16 +00:00
## Contributing
2018-05-09 17:07:01 +00:00
2022-02-07 00:33:16 +00:00
PRs are always welcome! To get started, follow
[this guide](https://www.edgedb.com/docs/internals/dev) to build EdgeDB from
source on your local machine.
2018-05-09 17:07:01 +00:00
2022-02-07 00:33:16 +00:00
[File an issue 👉](https://github.com/edgedb/edgedb/issues/new/choose)
<br />
[Start a Discussion 👉](https://github.com/edgedb/edgedb/discussions/new)
<br />
[Join the discord 👉](https://discord.gg/umUueND6ag)
2019-05-11 17:04:12 +00:00
2022-02-07 00:33:16 +00:00
<br />
2019-05-11 17:04:12 +00:00
2022-02-07 00:33:16 +00:00
## License
2018-05-09 17:07:01 +00:00
The code in this repository is developed and distributed under the
2020-01-11 01:41:39 +00:00
Apache 2.0 license. See [LICENSE](LICENSE) for details.