# cozodb/cozo

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/cozodb-cozo).**

3,880 stars · 132 forks · Rust · mpl-2.0

## Links

- GitHub: https://github.com/cozodb/cozo
- Homepage: https://cozodb.org
- awesome-repositories: https://awesome-repositories.com/repository/cozodb-cozo.md

## Topics

`client-server` `cozo` `cozoscript` `cross-platform` `database` `datalog` `embedded-database` `graph` `graph-algorithms` `graph-database` `graphdb` `relational-database` `single-executable`

## Description

Cozo is a logic-based database engine that functions as a relational data store, an embedded graph database, and a temporal vector database. It utilizes a Datalog-inspired query language to execute relational, recursive, and graph queries.

The system distinguishes itself through specialized indexing for high-dimensional vector similarity searches and near-duplicate detection using locality sensitive hashing. It also provides built-in temporal versioning, allowing for historical state retrieval and time-travel queries to access data as it existed at specific points in time.

Its broader capabilities include full-text search with tokenization, recursive graph analysis for pathfinding and community detection, and the execution of complex relational joins. The engine supports atomic transactions, persistent stored relations with schema definitions, and pluggable storage backends.

The database can be integrated directly into an application as an embedded library to manage concurrency without a separate server.

## Tags

### Data & Databases

- [Logic-Based Relational Querying](https://awesome-repositories.com/f/data-databases/logic-based-relational-querying.md) — Datomic Datalog allows executing relational and recursive queries using logic-based rules to analyze complex data relationships and graph structures. ([source](https://cdn.jsdelivr.net/gh/cozodb/cozo@main/README.md))
- [Logic Query Engines](https://awesome-repositories.com/f/data-databases/logic-query-engines.md) — Functions as a logic-based database engine using a Datalog-inspired query language for relational and recursive queries.
- [Datalog Recursive Rules](https://awesome-repositories.com/f/data-databases/recursive-structure-processors/recursive-structure-traversers/datalog-recursive-rules.md) — Implements Datalog-based recursion for computing transitive closures and complex graph traversals.
- [Database State History](https://awesome-repositories.com/f/data-databases/custom-event-tracking/transaction-history-tracking/database-state-history.md) — Tracks every change to relations over time to enable execution of queries against historical snapshots. ([source](https://cdn.jsdelivr.net/gh/cozodb/cozo@main/README.md))
- [Historical Data Querying Interfaces](https://awesome-repositories.com/f/data-databases/data-access-querying/historical-data-querying-interfaces.md) — Provides query interfaces to retrieve information exactly as it existed at any given point in time. ([source](https://docs.cozodb.org/en/latest/))
- [Atomic Transactions](https://awesome-repositories.com/f/data-databases/database-management-systems/database-systems-management/connection-transaction-management/atomic-transactions.md) — Provides atomic transactions to ensure multiple data operations succeed or fail as a single consistent unit.
- [Embedded Database Engines](https://awesome-repositories.com/f/data-databases/embedded-database-engines.md) — Integrates directly into application processes as a library, eliminating the need for a separate database server. ([source](https://cdn.jsdelivr.net/gh/cozodb/cozo@main/README.md))
- [Graph Databases](https://awesome-repositories.com/f/data-databases/graph-databases.md) — Provides an embedded library for managing highly connected datasets and executing graph algorithms within a host application.
- [Recursive Graph Analysis](https://awesome-repositories.com/f/data-databases/recursive-structure-processors/recursive-structure-traversers/recursive-graph-analysis.md) — Performs deep traversals and pathfinding on highly connected datasets using recursive logic and specialized graph algorithms.
- [Relational Data Storage](https://awesome-repositories.com/f/data-databases/relational-data-storage.md) — Provides persistent storage using relational schemas with defined primary keys and named tables. ([source](https://docs.cozodb.org/en/latest/tutorial.html))
- [Relational Join Engines](https://awesome-repositories.com/f/data-databases/relational-join-engines.md) — Combines records from multiple relations by matching variables across different rule bodies to find common values. ([source](https://docs.cozodb.org/en/latest/tutorial.html))
- [Vector Search Indexes](https://awesome-repositories.com/f/data-databases/search-indexing-technologies/search-indexing/search-and-indexing/vector-search-indexes.md) — Utilizes HNSW indices to perform high-performance proximity and similarity searches on high-dimensional vector embeddings. ([source](https://docs.cozodb.org/en/latest/))
- [Temporal Versioning](https://awesome-repositories.com/f/data-databases/temporal-versioning.md) — Provides temporal versioning to track historical data states and enable time-travel queries.
- [Temporal](https://awesome-repositories.com/f/data-databases/vector-databases/temporal.md) — Combines high-dimensional vector similarity search with built-in time-travel capabilities for historical state retrieval.
- [HNSW Indexes](https://awesome-repositories.com/f/data-databases/vector-indexing/hnsw-indexes.md) — Implements HNSW indices for high-dimensional vector embeddings to enable fast approximate nearest-neighbor similarity searches.
- [Logic-Based](https://awesome-repositories.com/f/data-databases/vector-search/logic-based.md) — Performs relational, graph, and vector searches across datasets using a logic-based query language. ([source](https://docs.cozodb.org/en/latest/))
- [Vector Similarity Search](https://awesome-repositories.com/f/data-databases/vector-similarity-search.md) — Identifies nearest neighbors in high-dimensional space using distance metrics and proximity indices. ([source](https://docs.cozodb.org/))
- [Network Analysis](https://awesome-repositories.com/f/data-databases/data-analysis-visualization/network-analysis.md) — Executes centrality and community detection algorithms to understand relationships between entities in a network. ([source](https://docs.cozodb.org/en/latest/))
- [Data Upsert Operations](https://awesome-repositories.com/f/data-databases/data-upsert-operations.md) — Implements operations that combine insertion and update logic based on defined primary keys. ([source](https://docs.cozodb.org/en/latest/tutorial.html))
- [Database State Restoration](https://awesome-repositories.com/f/data-databases/database-state-restoration.md) — Retrieves previous versions of data using time-travel capabilities to restore the database to a historical state. ([source](https://docs.cozodb.org/))
- [Probabilistic Duplicate Detection](https://awesome-repositories.com/f/data-databases/duplicate-detection-tools/probabilistic-duplicate-detection.md) — Identifies near-duplicate strings and lists using MinHash-LSH probabilistic indexing. ([source](https://docs.cozodb.org/))
- [Full Text Search](https://awesome-repositories.com/f/data-databases/full-text-search.md) — Indexes and retrieves unstructured text data using tokenization and filtering for keyword-based discovery.
- [Full-Text Search Engines](https://awesome-repositories.com/f/data-databases/full-text-search-engines.md) — Provides a search system with tokenization and MinHash-LSH indexing for keyword discovery and near-duplicate detection.
- [Graph Traversal](https://awesome-repositories.com/f/data-databases/graph-traversal.md) — Analyzes entity relationships using pathfinding, connectedness, and community detection algorithms. ([source](https://docs.cozodb.org/))
- [Pluggable Storage Backends](https://awesome-repositories.com/f/data-databases/pluggable-storage-backends.md) — Supports swapping between in-memory, local, and distributed storage backends via an architectural abstraction. ([source](https://cdn.jsdelivr.net/gh/cozodb/cozo@main/README.md))

### Software Engineering & Architecture

- [Embedded Runtime Models](https://awesome-repositories.com/f/software-engineering-architecture/embedded-runtime-models.md) — Functions as an embedded library runtime, allowing the database engine to be integrated directly into application processes.

### Part of an Awesome List

- [Graph Algorithms](https://awesome-repositories.com/f/awesome-lists/devtools/graph-algorithms.md) — Applies analytical graph algorithms like PageRank to stored relations through fixed rules. ([source](https://docs.cozodb.org/en/latest/tutorial.html))
- [Database Systems](https://awesome-repositories.com/f/awesome-lists/data/database-systems.md) — Transactional relational database focused on graph data.
- [Backend and Infrastructure](https://awesome-repositories.com/f/awesome-lists/devtools/backend-and-infrastructure.md) — Relational database with graph and vector support.

### Scientific & Mathematical Computing

- [Graph Analysis Frameworks](https://awesome-repositories.com/f/scientific-mathematical-computing/graph-analysis-frameworks.md) — Provides recursive computations and specialized algorithms to extract insights from highly connected datasets. ([source](https://cdn.jsdelivr.net/gh/cozodb/cozo@main/README.md))

### Security & Cryptography

- [MinHash-LSH Indexing](https://awesome-repositories.com/f/security-cryptography/cryptography/locality-sensitive-hashing/minhash-lsh-indexing.md) — Uses MinHash-LSH indexing to identify near-duplicate strings and lists via similarity fingerprinting.
