Neo4j / Graph DBs concept page. Native graph storage (nodes/edges as fixed-size records, doubly-linked rel lists, index-free adjacency). Cypher pattern matching. Replication via Raft (Causal Cluster). Compared with Postgres recursive CTE and vector embeddings. Five scenarios: friends-of-friends 3-hop traversal vs SQL self-joins, weighted shortest path (bidirectional BFS / Dijkstra), fraud ring detection (cycles of length 3-5), sharding pain (cross-shard traversal latency variance), operational gotchas (unbounded variable-length paths). Two ADRs: Neo4j vs Postgres CTE vs vector embeddings, replicate-the-full-graph vs vertex partitioning.
Neo4j stores a property graph and executes Cypher plans over nodes, relationships, properties, and indexes. Graph modeling can make a traversal natural, but it does not turn every graph query into constant time or make equivalent relational modeling impossible. Endpoint cardinality, branching, predicates, path semantics, indexes, and memory determine work.
Current Neo4j has several scale surfaces with different contracts: clustered primaries/secondaries replicate one database for availability and read scaling; composite databases federate or shard separate graphs with limited cross-constituent transaction scope; newer Infinigraph property sharding is a separate licensed feature. They are not one generic automatic-sharding guarantee.
Planned indexed traversal. An index narrows starting nodes, then relationship expansion and predicates determine remaining work.
Shortest-path operator choice. Bidirectional BFS is available for eligible single-pair plans; complex/all-target cases can use different or exhaustive operators.
Clustered database write. The driver routes a write to the elected writer, which commits with the primary replication protocol.
Bookmark causal read. A reader waits or routes until it can serve at least the bookmarked transaction.
Composite shard boundary. Reads can span constituents, while one transaction writes at most one constituent and relationships do not cross graphs.
shortestPath всегда Dijkstra или A*: unweighted Cypher operators и GDS algorithms имеют разные contracts.Введите числа или выберите пресет