Database Reference
In-Depth Information
Unconnected graphs
A perhaps obvious example of graph modeling antipatterns are the unconnected
graphs. Graphs are all about the connections between entities, and the power of
graph databases is all in the traversals of these connections from node to node. A
pattern like the one displayed in the following image should really not be used in
a graph database:
The unconnected graph
Relationships provide structure and query power in a graph, so not using
relationships leaves a wealth of opportunities underutilized.
The dense node pattern
We discussed before how graph queries work in a graph database system. The basic
principlewasthatofagraphlocalquery:startingata(setof)well-deinedstarting
point(s) and then crawling out from there. The traversal speed is typically very fast
and only dependent on the number of parts of the graph that the query will touch
or traverse through. Typically, traversal speeds are also very constant with growing
dataset sizes, simply because in a normal graph model, everything is not connected to
everything . The query will only evaluate the parts of the graph that are connected to
thestartingpoints,andtherefore,thetraversalspeedswillbelat.
A very interesting problem then occurs in datasets where some parts of the graph
are all connected to the same node. This node, also referred to as a dense node or a
supernode, becomes a real problem for graph traversals because the graph database
management system will have to evaluate all of the connected relationships to
that node in order to determine what the next step will be in the graph traversal.
Supernodes can be a real issue in graph database models and should be avoided
when setting up your Neo4j instances.
 
Search WWH ::




Custom Search