We're using Neo4J to model the "real world" with "things" here at ThingWorx as well. See my responses to Niels for some specifics.
________________________________________ From: user-boun...@lists.neo4j.org [user-boun...@lists.neo4j.org] On Behalf Of loldrup [lold...@gmail.com] Sent: Saturday, September 24, 2011 1:52 AM To: user@lists.neo4j.org Subject: [Neo4j] Modelling with neo4j I'm trying to figure out how to model the world most flexibly (okay, so I'm sticking to modelling organisations for now, but still). My main problem seems to occur when I want to allow the model to naturally expand in complexity. Say we have the following relationship: Joe is a janitor at the school. This can easily be modelled with two entities and a relationship. Now say I have some common properties for janitors. I would have to make a link from the janitor-relation to some node denoting the type 'janitor' which could then hold information on these common things. Unfortunately, relationships doesn't support that. Long story short: the problem is that sometimes I want my things to act as things, sometimes as types, sometimes as interfaces, and I cannot know in advance which of these modalities I'm going to need. Therefore, I'm considering going with this model: Imagine a graph in three layers. The lower layer represents things, the middle layer represents types and the upper layer represents interfaces. Initially i populate only the lowest layer, but as need arise I go back and promote various things to also be types or interfaces. These then crop up in the second and third layer of the graph, respectively. When this happens, a vertical relationship is added between the element in the lower layer and its new type/interface in three higher layers. Now the question is: how to model this scheme in neo4j? A number of challenges pops up: * Neo4j relationships cannot be n-ary, so every relationship must be modelled with a hyperrelationship, thus allowing future relations to the second and third layers. * In a modalities-are-a-changing-paradigm it doesn't really make sense to distinguish between relations and entities; at different points in time, one element may have to act in the roles of both. Neo4j however makes a fundamental destinction between the two things. I could choose too model all relationships as nodes, but will that not make graph traversals messy? * Neo4j doesn't come with a type strong destinction between such three layers of modalityy -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Modelling-with-neo4j-tp3363823p3363823.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. _______________________________________________ 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