Hi, I'm learning graph modeling with Neo4j and pretty new to few concepts. I have this doubt and not sure how to word it properly so unable to search in Google. Would appreciate all your help in this.
I see that have few options in modeling a feature of particular thing, for ex. features of iPhone in product hierarchy. I can have the feature as a property, another one is to have the feature as a relatonship (and the node being just "Yes") and 3rd one being have the feature as a separate node with relation "has_feature" to the main node.
I'm trying to understand the difference between these 3 and how they impact things down the line. As per the O'Reilly Graph Database book email example and "strong-weak" relations, it is better modeled as either a relation or a separate node. Is that usually the case? Can anyone direct me to resources that explain the difference between these?
Thank you Koji! That's very helpful. Particularly great point regarding the querying - better to have a node (rather than a property) if we would be querying that.
However, to clarify, a Node is useful once it has either a label or a property such as name. So an attribute isn't mapped to a Node, but the label of the node or one of the properties of the node. Likewise, for a Relationship, although we call it a Type instead of a label, and I am fairly sure only one type per Relationship is allowed. Of course you can have multiple relationships between two Nodes. In summary, you can map an attribute to a:
Node Label
Node Property
Relationship Type (similar to Label)
Relationship Property