Lun-Ven 8:00-12:30 14:00-17:30

Kuzu V0 136 (EASY - 2024)

Kùzu is an embedded, file-based graph database management system written in C++. Unlike traditional client-server databases (such as Neo4j), Kùzu operates directly inside your application process, eliminating network overhead. Think of it as the "SQLite for graph data." Core Architecture and Features

| Query Type | v0.135 (ms) | | Improvement | | :--- | :--- | :--- | :--- | | 2-hop neighbor count (dense node) | 840 | 512 | 39% faster | | 5-hop shortest path (weighted) | 1,250 | 890 | 28.8% faster | | Aggregating LIST properties | N/A (via JSON) | 210 | 50x faster (vs. JSON parse) | | Concurrent read-write mix (16 threads) | 2,100 | 1,480 | 29.5% better throughput |

Kùzu v0.13.6 allows you to export query results directly into Pandas DataFrames or Arrow Tables without manual type conversion overhead.

Recursive graph traversals (e.g., “find all friends within 5 hops”) have historically been expensive. In , the query planner introduces adaptive depth-first search (DFS) swapping . For highly dense graphs, the system now dynamically switches between BFS and DFS strategies at runtime, reducing memory spikes by up to 40% compared to v0.135.

import kuzu

v0.136 improves the reliability of the Python client, ensuring that complex transactions do not hang the interpreter and that resources are managed correctly during large batch operations.

Traditional graph databases often prioritize flexibility at the expense of performance, relying on pointer-chasing mechanics that cause severe CPU cache misses during deep analytical sweeps. Kùzu completely re-imagines graph query execution through several innovative design principles: 1. Embedded (In-Process) Design

It uses the industry-standard Cypher query language, making it easy for Neo4j developers to transition.

Kùzu allows you to create an on-disk database or run entirely in-memory. Let's create a persistent database and define a simple "User-Follows-User" social network graph. kuzu v0 136

Kuzu differs from traditional graph databases like Neo4j by focusing heavily on alongside columnar disk storage. Rather than traversing one pointer at a time, Kuzu group-loads data blocks and filters entire batches at once to bypass irrelevant data structures. Key architectural features include:

Kuzu v0.136 is particularly well-suited for:

“Database file version … Current build storage version: 34”

: Users can leverage the industry-standard Cypher query language. Vectorized Execution Kùzu is an embedded, file-based graph database management

Performance improvements for multi-hop recursive queries, which are essential for complex graph traversals.

Tracking software bills of materials (SBOMs), microservice dependencies, and infrastructure environments fits perfectly into a property graph. Because Kùzu is embedded, DevSecOps CLI tools can run Kùzu locally to evaluate real-time vulnerabilities down a deep dependency tree. Conclusion

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