That impedance mismatch you speak of can be overcome by writing your own API on 
top of Neo4J. 
Nothing keeps you for creating your own application layer that allows you to do 
the things you want to do. 
If you want relationships on relationships, create your own classes and 
interfaces, using nodes masquerading as relationships. 
You can even roll your own traversers that treat intermediate nodes as special 
cases, making the use of intermediate nodes just an implementation detail. 
Unlike SQL databases, Neo4j allows you to actually code pretty close to the 
metal, making it easier to create a setup that suits your particular needs.
Niels

> To: [email protected]
> Date: Fri, 17 Jun 2011 23:00:25 +0200
> From: [email protected]
> Subject: Re: [Neo4j] Node and Relationships as properties
> 
>   BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px;
> }Yes, but you have to add an intermediate node and then graph becomes
> to be like the 4th normal form in SQL. An artifact to adapt real life
> scenarios to pure and simple technologies. Again an impedance mismatch
> between real life and implementing technology.
>  Aniceto
>  On Fri 17/06/11  8:19 PM , Niels Hoogeveen [email protected]
> sent:
>  You can create a node type "community-role" with two outgoing
> relations "in_community" and "with_role", which respectively point to
> a "community" and to a "role". The "user node" can then have a
> relationship "has_community-role" pointing to a "community-role" node.
>  Every hypergraph structure can in principle be modeled in a property
> graph by introducing an intermediate node. > Date: Fri, 17 Jun 2011
> 18:52:55 +0200
>  > From: [email protected] [1]
>  > To: [email protected] [2]
>  > Subject: Re: [Neo4j] Node and Relationships as properties
>  > 
>  > Peter
>  > 
>  > This could be a use case:
>  > 
>  > Let's have "users", "roles", "permissions" and "communities".
>  > 
>  > Each role is defined as a permissions set. Users have assigned a
> list of 
>  > roles for every community they belong to.
>  > 
>  > If roles could be assigned this way   (user)-- 
>  > (has_role)[community_neo4j] --> (role)
>  > 
>  > we can manage separately each user, permissions in role and
> community. 
>  > we don't need to have a set of roles for each community. The
> communities 
>  > won't be erased if role assignments are enacted. And mainly they
> could 
>  > be used in  custom traversers and patterns.
>  > 
>  > I agree we are not used to see these kind of handwritten graphs,
> but how 
>  > can you draw a clean graph and use it in neo4j with referential 
>  > integrity without the ability of having a node as property value?
>  > 
>  > Regards
>  > Aniceto
>  > 
>  > > 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
>  > 
>  > _______________________________________________
>  > Neo4j mailing list
>  > [email protected] [3]
>  > https://lists.neo4j.org/mailman/listinfo/user
>  _______________________________________________
>  Neo4j mailing list
>  [email protected] [4]
>  https://lists.neo4j.org/mailman/listinfo/user
>  
> 
> Links:
> ------
> [1] mailto:[email protected]
> [2] mailto:[email protected]
> [3] mailto:[email protected]
> [4] mailto:[email protected]
> _______________________________________________
> 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