(smollerGraph)

smollerGraph: Building smollerGraph: A Graph Database from Scratch

A graph database, from the bytes up.

We're going to build a small graph database from scratch in C++: how it keeps nodes and relationships on disk, how it follows them from one to the next, and how a Cypher query becomes a plan that runs, measured against Neo4j and Kùzu, on the way to a knowledge graph that mvGPT can ask for facts.

  1. (pages)
  2. (records)
  3. (hops)
  4. (cypher)
  5. (plans)
  6. (transactions)
  7. (knowledge)
Down the food chain, two hops from the red fox
MATCH (:Animal {name: 'Red fox'})
      -[:EATS*2]->(food)
RETURN food.name
food.name
"Clover"
"Wheat"

Watch the seriesTry it in your browserRead the codeAbout

Start here

  1. Watch the first episode

    Before we build one in C++, why graphs, where the series is heading, and how Neo4j and Kùzu store a graph and run a query.

    Watch episode 01 · 33 min
  2. Follow the code

    Each step of an episode is a tag in the database's repository, so you can check out the code as it was at that point in the video.

    git checkout ep001/step-1Browse the code
  3. Read about the series

    What it covers, who it's for, and where it's heading.

    About the series

Latest episodes

All 20 episodes
  1. Packaging a C++ library for CMake FetchContent

    smollerGraph as a library another CMake project fetches, with its tests, tools and docs kept to its own build, its headers in include/smollergraph, a query in one call, a consumer project built in CI, and a version to pin.

    15 min

  2. Active Directory attack paths in a graph database

    A made-up company's Active Directory as a graph, and Cypher that follows several relationship types at once, so smollerGraph finds the paths from an account to Domain Admins, the way BloodHound does, in the browser too.

    25 min

  3. Graph database in a browser

    smollerGraph's library compiled to WebAssembly with Emscripten, unchanged, so the explorer runs in a browser tab on a graph it builds from Wikidata's facts as the page opens, published with the API docs on GitHub Pages.

    23 min

  4. Architecture decision records for our graph database

    Architecture decision records for smollerGraph, from its first episode's adjacency to last time's docs, each with what forced the choice, what lost to it and what it costs, and how a team proposes, accepts and supersedes them.

    13 min

Explore by topic