How come relationships are strongly typed while every node is just a generic
node? Example:
import org.neo4j.graphdb.RelationshipType;
public enum TaxonomyRelationshipTypes implements RelationshipType {
KNOWS
}
...
Node node1 = graphDb.createNode(); //just a generic node, apparently
Node node2 = graphDb.createNode();
Relationship rel = node1.createRelationshipTo(node2,
TaxonomyRelationshipTypes.KNOWS); //strong stuff..
(taken from http://sujitpal.blogspot.com/2011/07/second-look-at-neo4j.html )
Wouldn't it be smart to have strongly typed nodes, so I could have nodes for
'users', nodes for 'products', nodes for 'teams' etc.? I know I can apply
attributes to nodes, but that doesn't ensure any kind of consistency among
nodes denoting the same semantic idea (eg. 'users', 'products' or 'teams).
How do I model strongly typed nodes? Or, is there something that I have
missed? I'm quite new in graph databases...
--
View this message in context:
http://neo4j-community-discussions.438527.n3.nabble.com/Relationships-strongly-typed-nodes-just-nodes-Why-tp3198672p3198672.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user