Kuzu Link -

db = kuzu.Database('./test.db') conn = kuzu.Connection(db)

Step 3: Define a Schema (Cypher DDL)

# Create a Node table called 'User'
conn.execute("CREATE NODE TABLE User (name STRING, age INT64, PRIMARY KEY (name))")

Let’s walk through a real-world scenario. An online bookstore wants to recommend "customers who bought X also bought Y." Using Kuzu Link: kuzu link

MATCH (c:Customer)-[:PURCHASED]->(b:Book)<-[:PURCHASED]-(other:Customer)
MATCH (other)-[:PURCHASED]->(rec:Book)
WHERE NOT EXISTS((c)-[:PURCHASED]->(rec)) AND c.id = $customer_id
RETURN rec.title, COUNT(*) AS co_purchase_score
ORDER BY co_purchase_score DESC
LIMIT 10

Kuzu Link will:

Because each hop uses pointer-based Kuzu Link navigation, the entire query returns sub-second even with 10 million customers and 50 million purchase links. db = kuzu

Kuzu Link is not just a data ingestion feature; it is a design philosophy. It acknowledges that data is distributed and that graph databases should act as intelligent overlays rather than isolated islands. By enabling seamless links to Postgres, MySQL, and file formats like Parquet, Kuzu empowers developers to build "Graph-Native" applications on top of "Relation-Native" storage, combining the best of both worlds.


conn.execute("CREATE REL TABLE Follows (FROM User TO User, since INT64)") Step 3: Define a Schema (Cypher DDL) #

Step 4: Insert Data

conn.execute("CREATE (u:User name: 'Alice', age: 30)")
conn.execute("CREATE (u:User name: 'Bob', age: 25)")
conn.execute("CREATE (u1:User name: 'Alice')-[f:Follows since: 2020]->(u2:User name: 'Bob')")

Step 5: Query Data

result = conn.execute("MATCH (u:User)-[f:Follows]->(v:User) RETURN u.name, v.name, f.since")
print(result.get_as_df())

Financial institutions often store transaction logs in immutable SQL stores. By linking these tables to Kuzu, analysts can perform graph traversal (finding circular money movement) while referencing the raw transaction details stored in PostgreSQL, ensuring real-time accuracy without data latency.