AI-ENGINEERING
    intermediate

    Graph Database

    AI Engineer path · lesson 69 of 124
    The idea
    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.
    How to use
    Run graph traversal queries and compare them with the SQL equivalent to feel the difference in complexity.
    FRIENDS_WITHFRIENDS_WITHPURCHASEDPURCHASEDPURCHASEDPURCHASEDAlice:UserBob:UserCarol:UserLaptop:ProductPhone:ProductBook:ProductCamera:Product
    Click a node or relationship in the graph to inspect its labels and properties.

    Key insight

    In a property graph, nodes and edges aren't just connectors — each carries a label (:User, :Product) and its own key–value properties, just like a row would in a table. The difference is the relationship itself is a first-class, queryable thing with properties too (like PURCHASED {amount, date}), not a foreign key you have to join to reconstruct.

    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

    Test your knowledge

    20 questions
    Question 1 of 20
    Score: 0

    In a graph database, what does an edge represent?

    The short version

    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.

    Interview Questions

    Neo4j
    Amazon
    LinkedIn
    Neo4j
    LinkedIn
    Microsoft
    LinkedIn
    LinkedIn
    Meta
    Neo4j
    Amazon

    Love this visualization?

    Sign up to track your progress, earn achievements, use the AI assistant, and access your personal learning dashboard.

    100% free • No credit card required