LadybugDB — Mission
Sections
Reading settings
Natural voice recorded for this course, the same in every browser.
No voice for this language in this browser.
More voices
Code and English terms
Off: the page’s voice reads everything, with no pause between two voices.
No voice for this language in this browser.
More voices
More voices: Microsoft Edge has natural online voices, and Windows (Settings › Time & language › Speech), macOS and Android install others.
Why I’m learning this
Section titled “Why I’m learning this”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.
Who this course is for
Section titled “Who this course is for”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.
What LadybugDB is, in one table
Section titled “What LadybugDB is, in one table”| 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.
The data
Section titled “The data”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 andhrefattributes outside code blocks;external_links.csv: the 3,712 links to 85 other sites;commits.csv,parents.csvandchanges.csv: the 74 commits up tocbcbb42, 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.
Outline
Section titled “Outline”| # | 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 |
Resources
Section titled “Resources”- LadybugDB documentation
- Cypher in LadybugDB
- LadybugDB CLI
- LadybugDB source code, and the release 0.20.4 this course uses
- openCypher: the open specification of Cypher