Skip to content
learn

LadybugDB — Mission

The DuckDB course answers questions about rows: how many runs, how long, which step. Other questions about this site are about connections. How many clicks from the home page to a lesson? Which files change together? Which commits did a failing workflow run on? In SQL, each of these is a chain of self-joins, or a recursive CTE whose depth I have to guess.

A graph database stores the connections themselves, and its query language describes paths directly. LadybugDB is one that runs inside your process, like DuckDB and SQLite: no server to install.

You know SQL: SELECT, JOIN, GROUP BY, maybe a recursive CTE. You write C# or Java. You don’t need to know anything about graph databases or Cypher.

SQL Server graph tables Neo4j LadybugDB
Runs as a server as a server inside your process
Schema tables created AS NODE and AS EDGE optional: labels and properties appear when you write them required: node tables and relationship tables, with typed columns
Query language T-SQL with MATCH Cypher Cypher
Paths of any length SHORTEST_PATH variable-length patterns variable-length patterns, shortest paths
From .NET Microsoft.Data.SqlClient Neo4j .NET driver NuGet package LadybugDB
From Java JDBC driver Neo4j Java driver Maven package com.ladybugdb:lbug

Sources: SQL Graph architecture, Neo4j Cypher manual, differences between LadybugDB and Neo4j.

LadybugDB was formerly known as Kuzu. Kuzu’s authors have archived its repository; LadybugDB continues the code base under the MIT license, with new names: the CLI is lbug, and the documentation names database files .lbdb.

code/ladybugdb/data/extract.py reads this repository at commit cbcbb42 (2026-09-14) and writes six CSV files to code/ladybugdb/data:

  • pages.csv: the 319 pages of the site (117 in English, 101 in French, 101 in Spanish), with their locale, course, title and number of lines;
  • links.csv: the 712 links from one page of the site to another, found in Markdown links and href attributes outside code blocks;
  • external_links.csv: the 3,712 links to 85 other sites;
  • commits.csv, parents.csv and changes.csv: the 74 commits up to cbcbb42, the parent of each one, and the 1,019 file changes they made to 710 files.

Lesson 4 adds the 125 CI runs of code/duckdb/data/runs.json, the snapshot the DuckDB course queries.

Lessons 5 and 6 query another repository: the .NET projects of GuitarAlchemist/ga at commit a26a7893, extracted by code/ladybugdb/data/ga/extract.py: 111 projects, 266 project references and 478 package references.

By the end of this course, I will be able to

Section titled “By the end of this course, I will be able to”
  • model data as node tables and relationship tables, and query it with Cypher patterns;
  • load CSV and JSON files, and find the rows that don’t fit the schema;
  • write variable-length paths and shortest paths, and know the path semantics they use;
  • recognize LadybugDB’s bugs and limits, and check a result another way;
  • use LadybugDB from C# and from Java.
# Lesson If you know SQL
1 A first graph: tables, CREATE, MATCH, MERGE CREATE TABLE, INSERT, MERGE, JOIN
2 Loading files: LOAD FROM, COPY, warnings OPENROWSET, BULK INSERT
3 Paths: variable length and shortest paths recursive CTEs
4 Git history and CI runs as a graph self-joins, junction tables
5 LadybugDB from C# ADO.NET
6 LadybugDB from Java JDBC
7 Graph algorithms and full-text search full-text indexes, CONTAINSTABLE
8 Persistence, transactions and concurrency isolation, locks, the transaction log
9 A graph lab: translations, prerequisite cycles, bounded reachability test fixtures, a recursive CTE with a bound
— Journal