It cannot directly be done through the standard API, but of course it can be implemented. I do this myself in an application I am building. For every RelationshipType, i create a Node and between those Nodes there can have subtyping relationships. To make lookup fast, I use the node-id of the RelationshipTypeNodes as the RelationshipType name, and give it a more meaningful name by means of a property on the RelationshipTypeNode. This way the Node belonging to a RelationshipType can be fetched without overhead and it allows me to change the name of the relationhip type. Downside to the approach is that relationhips have no meaningful name when displayed in neoclipse. Of course you need to write your own methods to fetch relationships from nodes, because you may want to fetch not only the ones with the RelationhipType you supply, but also those with a RelationshipType that is a subtype thereof. Niels
> Date: Tue, 6 Dec 2011 16:39:19 +0530 > From: sourajit.ba...@gmail.com > To: user@lists.neo4j.org > Subject: [Neo4j] Modeling subrelationships in Neo4j > > Is it possible to create subrelationships in neo4j ? For e.g. a relationship > called KNOWS_BETTER as a subrelationship of KNOWS. > > Do I need to explicitly connect the nodes using both relationships for the > traversal to work ? Lets say, I create this > > neo4j --> KNOWS_BETTER --> graphDB, does this entails the following ? > neo4j --> KNOWS --> graphDB. > > Such a scenario can be modeled in OWL Ontology, wondering if neo4j has any > capabilities. > > Note: Under the hood, most OWL Ontology implementations do create these > *extra* inferred links internally. > _______________________________________________ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user