I agree,a Node is something that has 2 (user managed) fields: Relationship[] Property[]
and a Relationship is something that has 2 (user managed) fields: Node[2] Property[] and currently Property has two fields String key Object value where Object can be a scalar or array of basic types: String, int, long, boolean, ... My proposal is Node, Node[], Relationship and Relationsip[] be also valid values for properties. Aniceto > Date: Fri, 17 Jun 2011 05:24:19 -0700 > From: Rick Bullotta r > [email protected]>Subject: Re: [Neo4j] Node[] or Relationship[] as > properties > To: Neo4j user discussions user@lis > ts.neo4j.org>Message-ID: > 09DF3402C845EC489A3323A06208F > [email protected]> > Content-Type: text/plain; charset="us-ascii" > > I think some further understanding of Neo4J and graph databases would > help: > Node == precisely what a single relationship from a node accomplishes > Node[] == precisely what multiple relationships from a node > accomplishes > > > -----Original Message----- > From: [email protected] [ > [email protected]] On Behalf Of Aniceto PerezSent: Friday, June > 17, 2011 8:19 AM > To: user@lis > ts.neo4j.orgSubject: [Neo4j] Node[] or Relationship[] as properties > > I think it could be very useful to add these types as possible property > values > > Node or Node[] > Relationship or Relationship[] > > This is useful to implement more complex graphs. For instance, security > roles: > > I can define a security role as a node and users nodes can HAVE a > relationship to that role. > > The use case is when that role is related to something, for instance a > project. Let's have there are 4 standard roles for each project, and > 1000 projects. Currently I would need 4000 effective roles to be related > to users or only 4 roles but relationships between users and roles have > a property with the project that relationship is related to. The 4000 > roles solution is bad for management: every time a role is modified 1000 > modifications must be done. The projectname-as-a-property solution > doesn't enable easy navigation. > > A more elegant solution is to add a property to the user-->role > relationship: the related to project node. > > If Node is allowed, better if Node[] are allowed too. And maybe there > are also use cases for Relationship and Relationship[] as property > value. > Aniceto > _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

