Database Reference
In-Depth Information
Different strategies exist to deal with this density problem, and Neo Technology is
making some important changes to Neo4j to make this problem easier to deal with,
but the fact of the matter is that on most occasions we will want to avoid hitting this
technical risk by adapting our model. The following diagram highlights one potential
strategythatyoucanusefromthemusicartist/fangraphdomain:
Fan-out strategy for dense nodes
As you can see from the preceding diagram, the strategy essentially consists of
"fanning out" the dense relationships to Lady Gaga and Madonna . Instead of having
direct connections from millions of fans to these two popular artists, we create a
fan-like structure that connects fans to metanodes, interconnects the metanodes,
andtheninallyconnectsthetopofthemetanodehierarchytotheactualartist.The
recommendation then becomes that every metanode should have approximately 100
DENSE_LIKES relationships to connect fans to artists and that you can very quickly
traversetheserelationshipstoigureoutwhetherthereisavariable-lengthpathto
connect fans to artists.
Other strategies exist for this, and as we mentioned before, the problem is likely
tobesigniicantlyreducedinfutureversionsofNeo4j,butjustfromamodeling
perspective, it is very useful to be aware and conscious of this pattern and deal
with it proactively.
Test questions
Q1. The four fundamental data constructs of Neo4j are:
1. Table,record,ield,andconstraint
2.
Node, relationship, property, and schema
3.
Node, relationship, property, and label
4.
Document, relationship, property, and collection
 
Search WWH ::




Custom Search