Qlaudia

← All courses

neo4j

  • Technology & Computing

Graph databases store and query connected data as nodes and relationships rather than rows and tables, with Neo4j's native architecture enabling constant-time traversal across millions of hops. Cypher, Neo4j's declarative query language, uses ASCII-like patterns to intuitively express graph queries where relationships are stored as physical pointers instead of costly JOINs.

Sign in to enroll$1036 lessons

What you'll learn

  • APOC LibraryAn extension library providing hundreds of utility procedures and functions for Neo4j that handle tasks outside Cypher's core scope, such as advanced data import, string manipulation, and graph refactoring.
  • Aggregation FunctionsCypher functions that compute a single summary value from a set of matched rows by collapsing many rows into one per group, producing counts, sums, averages, or collected lists.
  • Bolt ProtocolThe binary, message-based network protocol that Neo4j uses for communication between clients and servers, featuring compact encoding, stateful sessions, and support for pipelining.
  • CREATE ClauseCypher's primary mechanism for unconditionally inserting new nodes and relationships into the graph, executing fresh inserts each time it runs regardless of duplicates.
  • ConstraintA schema rule that Neo4j automatically enforces to guarantee data integrity by rejecting write operations that would violate it.
  • Cypher Query LanguageA declarative query language for Neo4j that uses ASCII-art syntax to express graph patterns and retrieve or modify data.
  • DELETE and DETACH DELETECypher clauses that permanently remove nodes or relationships from the graph, with DELETE requiring isolated nodes and DETACH DELETE automatically removing connected relationships first.
  • Directed vs Undirected RelationshipsEvery Neo4j relationship stores a permanent direction between a start and end node, but queries can ignore this direction at runtime to match relationships bidirectionally.
  • Graph Algorithm ConceptsAnalytical techniques that operate on graph structure through the Graph Data Science library to extract insights using centrality, community detection, and pathfinding analysis.
  • Graph Data ImportThe process of loading data into Neo4j from external sources using mechanisms like LOAD CSV, which reads files and uses MERGE or CREATE to build the graph.
  • Graph Database ModelA storage system where data is organized as nodes and relationships, with meaning derived from both entity properties and the connections between them.
  • Graph Schema DesignThe process of translating a real-world domain into nodes, relationships, and properties, driven by the specific queries the application needs to answer.
  • IndexA data structure that maps property values to nodes, enabling fast lookups by jumping directly to matching nodes instead of scanning all nodes.
  • MATCH ClauseThe primary Cypher command for reading data, which finds all subgraphs in the database that conform to a specified pattern of nodes and relationships.
  • MERGE ClauseAn idempotent write operation that finds and returns an existing pattern if it exists, or creates it if it does not, with optional conditional actions for creation versus existing matches.
  • Native Graph StorageA database storage design where nodes physically store pointers to adjacent relationships and relationships store pointers to their endpoint nodes, eliminating the need for index lookups or JOIN operations during traversal.
  • Neo4j AuraA fully managed cloud database-as-a-service that runs Neo4j in the cloud and handles all infrastructure concerns including provisioning, patching, backups, scaling, and high availability.
  • Neo4j BrowserA built-in web-based interface for writing and executing Cypher queries, exploring results as graph visualizations, and inspecting database metadata without installing external tools.
  • Neo4j DesktopA local developer application that provides a graphical interface for creating, managing, and interacting with Neo4j database instances on your personal machine.
  • Neo4j DriverAn official language-specific library that allows application code to connect to a Neo4j database, send Cypher queries, and process results over the Bolt protocol.
  • NodeA fundamental unit of data in a Neo4j graph representing a discrete entity with an internal identity, optional labels, and key-value properties.
  • Node LabelA named category tag attached to a node to indicate what kind of entity it represents, enabling efficient grouping and querying.
  • Pattern MatchingThe core mechanism in Cypher that finds subgraphs by matching them against an ASCII-art-like structural template of nodes and relationships.
  • PropertyA key-value pair stored directly on a node or relationship to describe attributes such as names, dates, or connection weights.
  • Property Graph ModelThe foundational data structure of Neo4j that extends basic graphs by allowing both nodes and relationships to carry labels, properties, and types.
  • RETURN ClauseThe output stage of a Cypher query that specifies what information is sent back, whether entire nodes, individual properties, computed expressions, or aggregated values.
  • Relational vs Graph DatabaseRelational databases store relationships as foreign keys requiring JOIN operations at query time, while graph databases store relationships as first-class entities enabling efficient traversal of connected data.
  • RelationshipA directed, named connection between exactly two nodes that includes a start node, end node, mandatory type, and optional properties.
  • Relationship TypeA mandatory, immutable named label on every relationship that describes the semantic meaning of the connection between two nodes.
  • SET ClauseA clause that modifies existing graph elements by adding or updating node and relationship properties, removing properties by setting them to null, or adding and removing labels on nodes.
  • Shortest Path QueryA graph operation that finds the minimum-hop route between two nodes using Cypher's shortestPath() or allShortestPaths() functions, which perform unweighted breadth-first search.
  • TransactionA logical bundle of one or more Cypher queries that either completes fully or rolls back entirely, ensuring ACID-compliant atomicity, consistency, isolation, and durability of database changes.
  • UNWIND ClauseA Cypher clause that expands a list into individual rows so that per-element operations such as lookups, merges, or property updates can be applied to each item.
  • Variable-Length PathA Cypher pattern that matches relationships repeated a specified number of times between two nodes, enabling queries like finding nodes reachable within a certain number of hops.
  • WHERE ClauseA Cypher filter mechanism that narrows results from MATCH, OPTIONAL MATCH, or WITH clauses by imposing additional conditions on matched nodes and relationships.
  • WITH ClauseA Cypher construct that chains query segments together by taking results from one stage, optionally filtering or transforming them, and passing them forward as input to the next stage.

About this course

Neo4j: A Native Graph Database Platform

Neo4j is a database management system built from the ground up to store, query, and traverse connected data — data whose meaning is largely defined by the relationships between entities, not just the entities themselves. Where traditional relational databases organise information into rows and tables, Neo4j models data as a property graph: a network of nodes (entities) and relationships (connections), each of which can carry arbitrary key-value properties.

The word native is important here. Neo4j does not translate graph operations into SQL or map them onto a foreign storage engine. Its storage layer and query execution engine are purpose-built for graph traversal, which means following a chain of relationships — even across millions of hops — is a constant-time operation per hop rather than an exponentially expensive join.

Why Graphs?

Many real-world problems are inherently relational:

  • Social networks — who knows whom, and through how many degrees?
  • Fraud detection — which accounts share devices, addresses, or phone numbers?
  • Recommendation engines — what did people with similar tastes buy next?
  • Knowledge graphs — how are scientific concepts, papers, and authors connected?
  • Supply chains — what is the impact of a single supplier failure across a logistics network?

In a relational database, answering these questions requires multi-level JOIN operations whose cost grows with the depth of traversal. Neo4j resolves this by storing relationships as physical pointers between records, so a traversal follows a pointer rather than scanning an index.

Core Components of the Neo4j Platform

The Property Graph Model

Every piece of data in Neo4j lives within one unified structure:

  • Nodes — discrete entities (a Person, a Product, a Transaction).
  • Relationships — directed, named connections between two nodes (KNOWS, PURCHASED, TRANSFERRED_TO).
  • Properties — key-value pairs attached to both nodes and relationships (name: "Alice", amount: 250.00).
  • Labels — tags on nodes that group them into categories (Person, Employee).

Cypher Query Language

Neo4j's declarative query language is called Cypher. Its central insight is that queries look like the graph patterns they describe. A pattern such as:

(alice:Person)-[:KNOWS]->(bob:Person)

reads almost like an ASCII-art diagram of two people connected by a KNOWS relationship. Full Cypher queries use MATCH to find patterns, WHERE to filter, and RETURN to project results — analogous to SELECT … FROM … WHERE in SQL, but operating on graph topology rather than table rows.

Indexes and Constraints

Neo4j supports range indexes, full-text indexes, and vector indexes on node and relationship properties. Uniqueness constraints and property existence constraints enforce data integrity, playing a role similar to UNIQUE and NOT NULL in SQL.

ACID Transactions

Neo4j is fully ACID-compliant. Every read and write participates in a transaction, ensuring that the graph remains consistent even under concurrent workloads or partial failures.

Deployment Modes

ModeDescription
Neo4j AuraDBFully managed cloud service (AuraDB Free, Professional, Enterprise)
Neo4j ServerSelf-hosted instance, configurable for single-node or clustered deployments
Causal ClusterMulti-node setup with a leader-follower replication model for high availability
Neo4j DesktopDeveloper workstation tool bundling the database, Browser, and Bloom

Ecosystem Tools

  • Neo4j Browser — interactive query REPL with graph visualisation.
  • Neo4j Bloom — no-code visual exploration for business users.
  • Graph Data Science (GDS) Library — in-database algorithms: PageRank, community detection, pathfinding, link prediction, node embeddings.
  • Official Drivers — first-class support for Python, JavaScript, Java, Go, .NET, and more.

How the Pieces Fit Together

Property Graph Storage Nodes · Relationships Properties · Labels Cypher Query Engine MATCH · WHERE CREATE · MERGE · RETURN ACID Transactions Indexes · Constraints Consistency Guarantees Neo4j Browser Query REPL + Viz Bloom Visual Exploration GDS Library Graph Algorithms Official Drivers Python · JS · Java · Go Deployment Options AuraDB (Cloud) · Self-Hosted Server · Causal Cluster · Desktop

High-level architecture of the Neo4j platform: storage and query layers sit at the top, with developer tools and deployment options below.

Key Differentiators from Relational Databases

AspectRelational DBNeo4j
Data modelTables and rowsNodes and relationships
SchemaFixed, upfront DDLFlexible; evolve at runtime
Relationship storageForeign keys + JOINPhysical pointers (native)
Query languageSQLCypher
Deep traversal costExponential (JOINs)Linear in path length
Recursive queriesWITH RECURSIVE (awkward)Natural in Cypher

Learning Path

A solid understanding of Neo4j builds from the ground up:

  1. Graph Database Model — why this paradigm exists and when to use it.
  2. Nodes and Relationships — the atomic building blocks.
  3. Labels and Properties — how entities are categorised and described.
  4. Cypher basics — MATCH, CREATE, RETURN.
  5. Indexes and Constraints — performance and integrity.
  6. Advanced Cypher — aggregation, UNWIND, CALL subqueries.
  7. Graph Data Science — algorithm-based analytics.

Each of these topics is covered in dedicated documents within this knowledge base.

neo4j — Qlaudia