Aniceto,
introducing real Node and Relationship links as fields on Nodes and
relationships would essentially blur the distinction between Nodes,
Properties and Relationships, and let you treat the graph as a
Hypergraph. We find that model too abstract and hard to deal with the
edge cases of these structures in real world scenarios.

Instead, would it be possible for you to store NodeIDs in properties
instead, or serialise Node[] into byte arrays as properties? I don't
recommend it since it duplicates and unlinks information in the graph
that has to be maintained by triggers and updates, but that would be
one possibility. What is the concrete usecase that drives you to these
constructs?

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



2011/6/17 Aniceto Pérez y Madrid <[email protected]>:
> 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
>
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to