main
Ziyang Hu 2 years ago
parent be78a8d3e5
commit 0199410db3

@ -5,20 +5,18 @@
# `cozo`
A general-purpose, transactional, relational database
that uses Datalog for query, is embeddable, and focuses on graph data and algorithms.
that uses Datalog for query and focuses on graph data and algorithms.
## Features
* Relational database with [Datalog](https://en.wikipedia.org/wiki/Datalog) as the query language
* Recursive queries, recursion through (safe) aggregations, capable of expressing complex graph operations and
algorithms
* Fixed rules for efficient whole-graph algorithms which integrate seamlessly with Datalog
* Rich set of built-in functions and aggregations
* Easy to use from any programming language, or as a standalone program
* [Embeddable](https://cozodb.github.io/current/manual/setup.html#embedding-cozo), with ready-to-use bindings for
Python, NodeJS and Java
* Single executable, trivial to deploy and run
* [Jupyter](https://jupyter.org/) notebooks integration, plays well with the DataScience ecosystem
* Recursive queries, especially recursion through (safe) aggregation, capable of expressing complex graph operations and algorithms
* Fixed rules providing efficient whole-graph algorithms which integrate seamlessly with Datalog
* Rich set of built-in functions and aggregations
* Only a single executable, trivial to deploy and run
* [Embeddable](https://cozodb.github.io/current/manual/setup.html#embedding-cozo), can run in the same process as the application
* Easy to use from any programming language
* Special support for [Jupyter](https://jupyter.org/) notebooks for integration with the Python DataScience ecosystem
* Modern, clean, flexible syntax, informative error messages
## Teasers
@ -28,8 +26,6 @@ representing a route between those airports.
Find airports reachable by one stop from Frankfurt Airport (code `FRA`):
TODO replace with images
```js
?[dst] := *route{src: 'FRA', dst: stop},
*route{src: stop, dst}
@ -62,30 +58,10 @@ starting[airport] := airport = 'FRA'
?[src, dst, cost, path] <~ ShortestPathDijkstra(*route[], starting[])
```
Nice error messages when things go wrong:
xxx
## Getting started
First we need to get Cozo installed on the local machine. As Cozo is embeddable,
there are lots of options for how we run Cozo. Follow one of the following guides that suits you best:
## Learning Cozo
* Embedded in Python with JupyterLab (best interactive experience, recommended if you are comfortable with the Python
ecosystem)
* Embedded in Python
* Embedded in NodeJS (Javascript)
* Embedded in Java (or any JVM language)
* Embedded in Rust
* Client/server with HTTP API
* Embedded in C/C++, or any language that has a C FFI
(Golang, R, Haskell, CommonLisp, Julia, Fortran, C#, Swift, ...)
After you have it installed, you can start learning CozoScript:
* Start with the [Tutorial](https://nbviewer.org/github/cozodb/cozo/blob/main/docs/tutorial/tutorial.ipynb) to learn the
basics;
* Continue with the [Manual](https://cozodb.github.io/current/manual/) for the fine points.
* Start with the [Tutorial](https://nbviewer.org/github/cozodb/cozo/blob/main/docs/tutorial/tutorial.ipynb) to learn the basics;
* Continue with the [Manual](https://cozodb.github.io/current/manual/) to understand the fine points.
## Bug reports, discussions
@ -126,8 +102,7 @@ in specific situations:
Furthermore, the deterministic evaluation order makes identifying and solving
performance problems easier.
* Your data may be simple, even a single table, but it is inherently a graph.
* We have seen an example in
the [Tutorial](https://nbviewer.org/github/cozodb/cozo/blob/main/docs/tutorial/tutorial.ipynb):
* We have seen an example in the [Tutorial](https://nbviewer.org/github/cozodb/cozo/blob/main/docs/tutorial/tutorial.ipynb):
the air route dataset, where the key relation contains the routes connecting airports.
* In traditional databases, when you are given a new relation,
you try to understand it by running aggregations on it to collect statistics:
@ -190,11 +165,9 @@ Further down the road:
* More tuning options
* Streaming/reactive data
* Extension system
* The core of Cozo should be kept small at all times. Additional functionalities should be in extensions for the
user to choose from.
* The core of Cozo should be kept small at all times. Additional functionalities should be in extensions for the user to choose from.
* What can be extended: datatypes, functions, aggregations, and fixed algorithms.
* Extensions should be written in a compiled language such as Rust or C++ and compiled into a dynamic library, to be
loaded by Cozo at runtime.
* Extensions should be written in a compiled language such as Rust or C++ and compiled into a dynamic library, to be loaded by Cozo at runtime.
* There will probably be a few "official" extension bundles, such as
* arbitrary precision arithmetic
* full-text "indexing" and searching
@ -213,6 +186,5 @@ We manually wrote the C++/Rust bindings for RocksDB with [cxx](https://cxx.rs/).
## Licensing
The contents of this project are licensed under AGPL-3.0 or later, except:
* Files under `cozorocks/`, `python/`, `nodejs/`, `java/` and `c/` are licensed under MIT, or Apache-2.0, or BSD-3-Clause;
* Files under `cozorocks/` are licensed under MIT, or Apache-2.0, or BSD-3-Clause;
* Files under `docs/` are licensed under CC BY-SA 4.0.
Loading…
Cancel
Save