Neo4j: What is a Node?
Here Mark Needham shows us what a node consists of in a graph database for Neo4j
One of the first things I needed to learn when I started using Neo4j was how to model my domain using nodes and relationships and it wasn’t initially obvious to me what things should be nodes.
Luckily Ian Robinson showed me a mini-algorithm which I found helpful for getting started. The steps are as follows:
- Write out the questions you want to ask
- Highlight/underline the nouns
- Those are your nodes!
This is reasonably similar to the way that we work out what our objects should be when we’re doing OO modelling and I thought I’d give it a try on some of the data sets that I’ve worked with recently:
- Female friends of friends that somebody could go out with
- Goals scored by Arsenal players in a particular season
- Colleagues who have similar skills to me
- Episodes of a TV program that a particular actor appeared in
- Customers who would be affected if a piece of equipment went in for repair
Read the Full Article Here.