To see the power of Kùzu v0.1.3.6, let's walk through a practical scenario: building a simple user-interaction graph, populating it with data, and querying it using Cypher. 1. Installation
In this comprehensive deep dive, we will explore the core architecture of Kùzu, unpack the new features and fixes introduced in version 0.13.6, and demonstrate how to get started building high-performance graph applications. What is Kùzu?
import kuzu db = kuzu.Database('./my_graph_db') conn = kuzu.Connection(db) # Create a schema conn.execute("CREATE NODE TABLE User(name STRING, age INT64, PRIMARY KEY (name))") conn.execute("CREATE REL TABLE Follows(FROM User TO User)") # Ingest data conn.execute("CREATE (:User name: 'Alice', age: 30)") conn.execute("CREATE (:User name: 'Bob', age: 25)") conn.execute("MATCH (a:User), (b:User) WHERE a.name = 'Alice' AND b.name = 'Bob' CREATE (a)-[:Follows]->(b)") Use code with caution. Conclusion kuzu v0 136
), cyclic, or recursive joins, traditional engines generate massive flat tables containing redundant data permutations. Kùzu compresses intermediate query states using factorized representations, minimizing redundant calculations. Combined with columnar disk storage and compressed sparse row-based (CSR) adjacency lists, it scans data sequentially while skipping unnecessary records. Technical Specifications and Capabilities
Among these innovations is . Originating from academic roots at the University of Waterloo, Kùzu bridges the gap between relational-style performance optimizations and the flexible data structures inherent to graph networks. To see the power of Kùzu v0
(released September 2024) is a significant incremental update that solidifies Kuzu’s position as the leading "embeddable" property graph database.
: Academic research and independent benchmarks have shown Kùzu executes queries significantly faster than Neo4j or PostgreSQL-based graph extensions like Apache AGE, thanks to its specialized relational engine and novel join algorithms. What is Kùzu
To learn more about the release, check out the project's official repository or join their community channels to see what features are slated for the upcoming milestones:
import kuzu # 1. Initialize the database and connect to it # Provide a directory path for persistent storage, or leave empty for an in-memory DB db = kuzu.Database("my_graph_db") conn = kuzu.Connection(db) # 2. Create Node Schemas conn.execute("CREATE NODE TABLE User(name STRING, age INT64, PRIMARY KEY (name))") conn.execute("CREATE NODE TABLE Software(name STRING, language STRING, PRIMARY KEY (name))") # 3. Create Relationship Schema conn.execute("CREATE REL TABLE WROTE(FROM User TO Software, year INT64)") # 4. Insert Data conn.execute("CREATE (:User name: 'Alice', age: 30)") conn.execute("CREATE (:User name: 'Bob', age: 25)") conn.execute("CREATE (:Software name: 'Kuzu', language: 'C++')") # Connect nodes with relationships conn.execute(""" MATCH (u:User name: 'Alice'), (s:Software name: 'Kuzu') CREATE (u)-[:WROTE year: 2026]->(s) """) # 5. Query the Graph using Cypher print("Querying graph relationships:") response = conn.execute(""" MATCH (u:User)-[w:WROTE]->(s:Software) RETURN u.name, w.year, s.name, s.language """) while response.has_next(): row = response.get_next() print(f"Developer: row[0] | Year: row[1] | Software: row[2] (row[3])") Use code with caution. Comparing Kùzu with Other Database Paradigms Kùzu v0.13.6 DuckDB / SQLite In-Process (Embedded) Client-Server In-Process (Embedded) Data Model Property Graph Property Graph Relational (Tables) Query Language Join Efficiency Extremely High (Factorized) High (Index-free adjacency) Low-Medium (Expensive Joins) Primary Focus Embedded Graph Analytics Enterprise Graph Platform Embedded Tabular Analytics When to Choose Kùzu over Neo4j
Performance improvements for multi-hop recursive queries, which are essential for complex graph traversals.