Any rule of thumb on where to use label vs node property vs relationship + node.
Let's have an example, say I have a store and I want to put my products in neo4j. Their identifier is the product sku, and I also want to have a categorization on them like this one is for clothes, food, electronics, and you get the idea. I'll be having a free search on my graph, like the user can search anything, and I'd return all the things related to that search string.
Would it be better to use:
- I have a node with
sku 001
, and I'll tag it a label ofFood
. - I have a node with
sku 001
, and have property on this node calledcategory:"Food"
- I have a node with
sku 001
, and I'll create another node for theFood
, and will create a relationship of "category
" to relate them.
I have read that if you'll be looking up a property, it's better off as a relationship + node, as traversing is much faster than looking up properties of node.
TIA