datalevin
datalevin/datalevin
A simple, fast and versatile Datalog database
Overview
Datalevin is a durable Datalog database designed to provide a simple and efficient query engine for developers.
Categories
Tags
Similar tools
ECC
affaan-m/ECC
The agent harness performance optimization system
AutoGPT
Significant-Gravitas/AutoGPT
AutoGPT: Build, Deploy, and Run AI Agents
prompts.chat
f/prompts.chat
The world's largest open-source prompt library for AI
JavaGuide
Snailclimb/JavaGuide
Snailclimb/JavaGuide: 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
browser-use
browser-use/browser-use
🌐 Make websites accessible for AI agents. Automate tasks online with ease.
caveman
JuliusBrussee/caveman
Cuts 65% of tokens in AI coding agent responses.
Install
git clone https://github.com/datalevin/datalevinREADME
Datalevin
🧘 Simple, fast and versatile Datalog database for everyone 💽
I love Datalog, why hasn't everyone used this already?
Datalevin (/ˈdadə ˈlevən/, "levin" means "lightning") is a simple durable Datalog database. Here's what a Datalog query looks like in Datalevin:
(d/q '[:find ?name ?total
:in $ ?year
:where [?sales :sales/year ?year]
[?sales :sales/total ?total]
[?sales :sales/customer ?customer]
[?customer :customers/name ?name]]
(d/db conn) 2024)
:question: Why
The rationale is to have a simple, fast, versatile and open source Datalog query engine running on durable storage.
It is our observation that many developers prefer the flavor of Datalog popularized by Datomic® over any flavor of SQL, once they get to use it. Perhaps it is because Datalog is more declarative and composable than SQL, e.g. the automatic implicit joins seem to be its killer feature. In addition, the recursive rules feature of Datalog makes it suitable for graph queries and deductive reasoning.
The feature set of Datomic® may not be a good fit for some use cases. One thing that may confuse some users is its temporal features. To keep things simple and familiar, Datalevin behaves the same way as most other databases: when data are deleted, they are gone. Datalevin also follows the widely accepted principles of ACID, instead of introducing unusual semantics.
In addition to support Datomic® flavor of Datalog query language, Datalevin has a novel cost-based query optimizer with a much better query performance, which is competitive with SQL RDBMS such as PostgreSQL and graph databases such as Neo4j.
Datalevin provides robust ACID transaction features on the basis of our fork of LMDB, known for its high read performance. With built-in support for WAL and asynchronous transaction, Datalevin can also handle write intensive workload.
Datalevin can store large document (< 2 GiB) and automatically build index by paths for JSON, EDN and Markdown