Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-01-2020 12:03 PM
Hello Folks,
Hi i have some basic question on data modeling.
I have a Person node which is holding so much details about Person e.g DoB,DoJ,Firstname,lastName, Education , Hobbies, Employment etc just like any Social media platform.
do i divide these info to nodes and relate to Person via outer Relations, or should i add those information into the Node Properties.
need your guidance on it.
08-01-2020 01:10 PM
generally speaking you want to limit fan-out of nodes unless you have a specific reason to do so:
Keep in mind that it is always faster to query through traversals rather than searching properties. A well constructed graph query will land on anchor nodes (that have labels and perhaps an indexed property to help identify it) and then follow local traversals along connected relationships to produce your result set.
When considering properties that have low cardinality ( eg gender), these are best modeled as labels rather than nodes with relationships, since modeling those type of properties as nodes would lead to dense nodes (a node with millions of relationships) that can slow down your graph queries. Neo4j has full support for set operations, so you can put more than one label on your nodes to help filter them quickly using set logic: (n:Customer:Female)
or (n:Customer) WHERE NOT n:Lapsed
The nice thing about graphs is that as the designer, you can experiment until you have something that works well for your use case.
All the sessions of the conference are now available online