Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-30-2020 03:53 AM
I intend to document some stuff as a graph in neo4j (instead of using a wiki or confluence or so).
Now I wonder what is an efficient and sustainable approach to do that.
Where should I keep the "source of truth"?
I expect that it will be more efficient to generate some parts of the graph (nodes and relations).
Solved! Go to Solution.
08-30-2020 12:24 PM
How complex is the graph? Approach 1 works for small graphs, but you will have to rely on your memory should you ever need to rebuild it. It is also the only approach you listed that cannot be put into version control, like git, cvs, ClearCase, etc.
I've used #2 on a few projects, but admit I occasionally forget to copy a Cypher statement to the text file once I get the statement working and have to reconstruct it if it goes too far back in history.
My favorite option is to create either a Jupyter notebook or script in one of the supported languages (I use Python and R) that can rebuild the graph. My graphs typically pull from several SQL database sources, and I need to combine the data before going into a graph, so this is usually the best option for me. Think about whether you might need to do this for your graph in the future.
08-30-2020 12:21 PM
How big do you expect your graph to be?
If it is quite small, then I would go with a file containing cypher statements, otherwise you might think of some script to generate the graph as executing cypher statements from a text file tend to get slow when your graph reaches 10k+ nodes or so.
08-30-2020 12:24 PM
How complex is the graph? Approach 1 works for small graphs, but you will have to rely on your memory should you ever need to rebuild it. It is also the only approach you listed that cannot be put into version control, like git, cvs, ClearCase, etc.
I've used #2 on a few projects, but admit I occasionally forget to copy a Cypher statement to the text file once I get the statement working and have to reconstruct it if it goes too far back in history.
My favorite option is to create either a Jupyter notebook or script in one of the supported languages (I use Python and R) that can rebuild the graph. My graphs typically pull from several SQL database sources, and I need to combine the data before going into a graph, so this is usually the best option for me. Think about whether you might need to do this for your graph in the future.
All the sessions of the conference are now available online