Back to topics

Cypher on SQLite: Bridging Graph Queries with Embedded Databases Through a Virtual Table Extension

1 min read
196 words
SQLite extensions Cypher SQLite:

SQLite Graph Ext brings graph database power to SQLite with Cypher queries, all inside a single DB file. This alpha extension lets you CREATE and MATCH on graphs right alongside your relational data. [1]

How it works You load the extension, create a virtual table using graph(), and run cypher_execute for CREATE and MATCH. The complete pipeline—lexer, parser, logical and physical planners, and a Volcano-style executor—is implemented in C99 with no dependencies beyond SQLite. [1]

Current capabilities & limits - Works now: Full CREATE (nodes, relationships, properties), MATCH with relationship patterns, WHERE, RETURN; virtual table integration for mixing SQL and Cypher. [1] - Performance: 340K nodes/sec inserts; 390K edges/sec; 180K nodes/sec scans. [1] - Limitations: Only forward relationships; no relationship property filtering; no variable-length paths; no aggregations, ORDER BY, property projection; strings must use double quotes. [1]

Why it matters This approach unifies graph and relational data in a single DB file, letting apps model networks and tables under one roof. It’s MIT licensed and standalone. [1]

Roadmap & next steps Bidirectional relationships, property projection, and aggregations are on the horizon; the goal is full Cypher by Q1 2026. [1]

GitHub: GitHub repo at https://github.com/agentflare-ai/sqlite-graph. [1]

References

[1]
HackerNews

Show HN: SQLite Graph – Graph database with Cypher queries (alpha, but working)

Adds a graph database layer to SQLite with Cypher support; supports CREATE, MATCH, and RETURN via a virtual table extension.

View source

Want to track your own topics?

Create custom trackers and get AI-powered insights from social discussions

Get Started