Skip to content

turing-db/turingdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3,774 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TuringDB logo

A Blazingly Fast Column-Oriented Graph Database Engine

WebsiteDocumentationDiscordExamples

CI Ubuntu Discord Docs

What is TuringDB?

TuringDB is a high-performance in-memory column-oriented graph database engine designed for analytical and read-intensive workloads. Built from scratch in C++.

TuringDB delivers millisecond query latency on graphs with millions of nodes and edges. TuringDB is commonly 200x faster than Neo4j on deep multihop queries.

Visualizing a massive mesh graph with OpenGL accelerated graph visualization

Why TuringDB?

TuringDB was created to solve real-world performance challenges in critical industries where every millisecond matters:

  • Bioinformatics & Life Sciences - Analyse complex deep multi-scale biological networks
  • AI & Machine Learning - Power GraphRAG, knowledge graphs, and agentic AI systems
  • Real-time Analytics - Build dashboards and simulations with instant query responses
  • Healthcare & Pharma - Handle sensitive data with GDPR compliance and auditability
  • Financial Services - Audit trails with git-like versioning for regulatory compliance

Key Features

  • 0.1-50ms query latency for analytical queries on 10M+ node graphs
  • Column-oriented architecture with streaming query processing: nodes and edges are processed in chunks for efficiency
  • In-memory graph storage with efficient memory representations
  • Reads and writes never compete - analytical queries run without locking from writes
  • Massive parallelism for dashboards, AI pipelines, and batch processing
  • Each transaction executes on its own immutable snapshot. Guarantees Snapshot Isolation.
  • Create and commit graph versions, maintain branches, merge changes, and time travel through history
  • Perfect for reproducibility, auditability, and regulatory compliance
  • Immutable snapshots ensure data integrity
  • OpenCypher query language
  • Python SDK with comprehensive API

Benchmarks

TuringDB delivers exceptional performance on standard graph workloads 200X faster than Neo4j:

Multi-hop Queries From a Set of Seed Nodes

Specs: Machine with AMD EPYC 7232P 8-Core CPU and RAM 64G

MATCH (n{displayName: ‘APOE-4’}) RETURN count(n)

Query for 1-hop: MATCH (n{displayName: ‘APOE-4’})-->(m) RETURN count(n)

Query Depth Neo4j Mean TuringDB Mean Speedup
1-hop 1390 ms 12 ms 115×
2-hop 1420 ms 11 ms 129×
4-hop 1568 ms 14 ms 112×
7-hop 51,264 ms 172 ms 298×
8-hop 98,183 ms 476 ms 206×

Details: MATCH query returning node IDs from a set of 15 seed nodes with an increasing number of hops through outgoing edges.

See our detailed benchmarks for more performance data.

Quickstart

Requirements

Install via pip

  • Linux: tested primarily on Ubuntu Jammy 22.04 LTS
  • MacOS

For Build

TuringDB requires:

For Linux:

  • Linux Ubuntu Jammy 22.04 LTS or later
  • GCC version >=11
  • CMake 3.10 or higher

For MacOS:

  • LLVM Clang version >=15
  • CMake 3.10 or higher

Install TuringDB

Using pip:

pip install turingdb

or using the uv package manager (you will need to create a project first):

uv add turingdb

And then it should be in your $PATH

or using the docker image: If you can it’s better to use TuringDB within a uv project or with pip install to avoid loss in latency performance related to the docker deployment.

docker run -it turingdbai/turingdb:nightly turingdb

How to run

Run the turingdb binary to use turingdb in interactive mode in the current terminal:

turingdb

To run turingdb in the background as a daemon:

turingdb -demon

The turingdb REST API is running in both interactive and demon mode on http://localhost:6666 by default.

Visualise the graph you have created in TuringDB

TuringDB WebGL accelerated graph visualizer allows you to visualise large graphs in the browser: TuringDB Visualizer

Example of a biological interaction graph built in TuringDB:

  1. Choose on the top right the graph
  2. Search & select a node(s) of interest (magnifying glass button on the left)
  3. Then go to visualiser (network logo) and you can start exploring paths, expanding neighbours, inspect nodes (parameters, hyperlinks, and texts stored on the nodes)

How to build

  1. Build on Ubuntu Jammy or later

  2. Clone with submodules

git clone --recursive https://github.com/turing-db/turingdb.git
./pull.sh
  1. Install dependencies (run only once)
./dependencies.sh

This script will automatically build or install:

  • Curl and OpenSSL
  • GNU Bison and Flex
  • Boost
  • OpenBLAS
  • AWS SDK for C++
  • Faiss vector search library
  1. Build TuringDB:
mkdir -p build && cd build

cmake ..
make -j8
make install
  1. Setup environment:
source setup.sh

This adds turingdb binaries to the $PATH of the current shell.

Usage Example

Create and Query a Graph

// Create nodes
CREATE (alice:Person {name: "Alice", age: 30})
CREATE (bob:Person {name: "Bob", age: 25})
CREATE (computers:Interest {name: "Computers", hasPhD: true})

// Create relationships
MATCH (a:Person {name: "Alice"}), (b:Person {name: "Bob"})
CREATE (a)-[:KNOWS {since: 2020}]->(b)

MATCH (a:Person {name: "Alice"}), (i:Interest {name: "Computers"})
CREATE (a)-[:INTERESTED_IN]->(i)

// Query the graph
MATCH (a:Person)-->(b)
WHERE a.age > 25
RETURN a.name, b.name

Python SDK

from turingdb import TuringDB

# Connect to TuringDB
db = TuringDB(host="localhost", port=XXX)

# Execute query
result = db.query("""
    MATCH (p:Person)-[:INTERESTED_IN]->(i:Interest)
    RETURN p.name, i.name
""")

for record in result:
    print(f"{record['p.name']} is interested in {record['i.name']}")

Use cases Notebooks

A collection of notebooks demonstrating how to use TuringDB for real-world analytical examples.

Each notebook focuses on a different domain and use case, from fraud detection to biological graph exploration, leveraging the performance and versioning capabilities of TuringDB.

Explore the full set of notebooks:

github.com/turing-db/turingdb-examples

Finance & Fraud Detection

Paysim Financial Fraud Detection

Crypto Orbitaal Fraud Detection

Transport & Supply Chain

London Transport (TfL)

Supply Chain - ETO Chip Explorer

Healthcare & Life Sciences

Reactome Biological Pathways

Healthcare Knowledge Graph

Core Concepts

  • Columnar Storage: Nodes and edges stored in columns for efficiency and streaming query processing. Brings modern database research ideas to graph databases.
  • DataParts: Immutable data partitions that enable git-like versioning and zero locking between reads and writes
  • Snapshot Isolation: Each query sees a consistent snapshot view of the graph
  • Zero-locking: Read optimised architecture for high analytic workloads performance

Learn more in our documentation.

Documentation

Community & Support

Contributing

We welcome contributions! Contact our team to contribute to TuringDB: team@turingdb.ai

License

TuringDB Community Edition is licensed under the BSL License

See LICENSE for more details.

Contact TuringDB Team


Built with ❤️ for the graph database community

Star us on GitHub - it helps the project grow!

⬆ Back to Top

About

TuringDB high performance in-memory column-oriented graph database engine

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors