IntermediateAbout 15 min

    Graph Database

    Read the full article on Substack

    7 min read.

    Click through the property-graph model, run Cypher-style traversals compared to the equivalent SQL joins, and see illustrated use cases — the engine behind recommendations and knowledge graphs.

    Think of it this way: A graph DB is a city map where roads (relationships) are first-class: "friends-of-friends who bought X" is following a couple of streets. The relational version is reconstructing those streets from a stack of address spreadsheets each time.

    FRIENDS_WITHFRIENDS_WITHPURCHASEDPURCHASEDPURCHASEDPURCHASEDAlice:UserBob:UserCarol:UserLaptop:ProductPhone:ProductBook:ProductCamera:Product

    2 hops from Alice. Press Run to walk it, or tap a node to see its properties.

    Check your understanding

    Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.

    Node, relationship, or property?

    Sort

    Sort each piece of a property graph.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    Node

    Drop items here

    Relationship

    Drop items here

    Property

    Drop items here
    6 pieces left to place

    Quiz

    20 questions
    Question 1 of 20
    Score: 0

    In a graph database, what does an edge represent?

    Done with this lesson?

    Sign in free to keep your progress, streak and quiz scores.

    Keep going